projects
/
cascardo
/
ovs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
56450a4
)
ofproto-dpif-sflow: Fix memory leak.
author
Ben Pfaff
<blp@nicira.com>
Tue, 20 Aug 2013 18:27:32 +0000
(11:27 -0700)
committer
Ben Pfaff
<blp@nicira.com>
Tue, 20 Aug 2013 18:27:32 +0000
(11:27 -0700)
dpif_sflow_set_options() uses xcalloc() to allocate space for the SFLAgent
structure, but nothing ever freed it. This fixes the problem.
Found by valgrind.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
ofproto/ofproto-dpif-sflow.c
patch
|
blob
|
history
diff --git
a/ofproto/ofproto-dpif-sflow.c
b/ofproto/ofproto-dpif-sflow.c
index
b387b94
..
44ad927
100644
(file)
--- a/
ofproto/ofproto-dpif-sflow.c
+++ b/
ofproto/ofproto-dpif-sflow.c
@@
-280,6
+280,7
@@
dpif_sflow_clear__(struct dpif_sflow *ds) OVS_REQUIRES(mutex)
{
if (ds->sflow_agent) {
sfl_agent_release(ds->sflow_agent);
+ free(ds->sflow_agent);
ds->sflow_agent = NULL;
}
collectors_destroy(ds->collectors);