diff mbox series

[ovs-dev] stopwatch: Free stopwatch packets after processing

Message ID 1557320183-28091-1-git-send-email-dceara@redhat.com
State Accepted
Headers show
Series [ovs-dev] stopwatch: Free stopwatch packets after processing | expand

Commit Message

Dumitru Ceara May 8, 2019, 12:56 p.m. UTC
The free(pkt) call was missing inside the stopwatch_thread processing
loop.

Signed-off-by: Dumitru Ceara <dceara@redhat.com>
---
 lib/stopwatch.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Eelco Chaudron May 8, 2019, 2:26 p.m. UTC | #1
On 8 May 2019, at 14:56, Dumitru Ceara wrote:

> The free(pkt) call was missing inside the stopwatch_thread processing
> loop.
>
> Signed-off-by: Dumitru Ceara <dceara@redhat.com>
> ---
>  lib/stopwatch.c | 1 +
>  1 file changed, 1 insertion(+)
>

Change looks good to me…

Acked-by: Eelco Chaudron <echaudro@redhat.com>
Ben Pfaff May 8, 2019, 5:29 p.m. UTC | #2
On Wed, May 08, 2019 at 04:26:01PM +0200, Eelco Chaudron wrote:
> 
> On 8 May 2019, at 14:56, Dumitru Ceara wrote:
> 
> > The free(pkt) call was missing inside the stopwatch_thread processing
> > loop.
> >
> > Signed-off-by: Dumitru Ceara <dceara@redhat.com>
> > ---
> >  lib/stopwatch.c | 1 +
> >  1 file changed, 1 insertion(+)
> >
> 
> Change looks good to me…
> 
> Acked-by: Eelco Chaudron <echaudro@redhat.com>

Thanks.

I added a Fixes: tag and applied this to master and as far back as
branch-2.10.
diff mbox series

Patch

diff --git a/lib/stopwatch.c b/lib/stopwatch.c
index 54a85ed..f560216 100644
--- a/lib/stopwatch.c
+++ b/lib/stopwatch.c
@@ -450,6 +450,7 @@  stopwatch_thread(void *ign OVS_UNUSED)
                 should_exit = true;
                 break;
             }
+            free(pkt);
         }
         ovs_mutex_unlock(&stopwatches_lock);