mirror of
https://github.com/openvswitch/ovs
synced 2025-08-30 05:47:55 +00:00
ofproto-dpif-sflow: Fix memory leak.
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>
This commit is contained in:
parent
56450a416c
commit
0891637f67
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user