From: Ben Pfaff Date: Tue, 18 Dec 2012 21:18:26 +0000 (-0800) Subject: ofproto-dpif: Fix another memory leak in type_run(). X-Git-Tag: sliver-openvswitch-1.9.90-3~10^2~82 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=c83b89ab6da8704b140ec51cd5bae10448b510cb;p=sliver-openvswitch.git ofproto-dpif: Fix another memory leak in type_run(). 'devname' needs to be destroyed whether it's the datapath device or not. Signed-off-by: Ben Pfaff --- diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c index b78d6cf55..6ce9a07c4 100644 --- a/ofproto/ofproto-dpif.c +++ b/ofproto/ofproto-dpif.c @@ -836,7 +836,7 @@ type_run(const char *type) /* Don't report on the datapath's device. */ if (!strcmp(devname, dpif_base_name(backer->dpif))) { - continue; + goto next; } ofproto = lookup_ofproto_dpif_by_port_name(devname); @@ -857,6 +857,7 @@ type_run(const char *type) } dpif_port_destroy(&port); + next: free(devname); }