From: Eric Blake Date: Thu, 13 Oct 2011 22:45:58 +0000 (-0600) Subject: macvtap: plug memory leak for 802.1Qbh X-Git-Tag: v0.9.7-rc1~103 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0472f39;p=thirdparty%2Flibvirt.git macvtap: plug memory leak for 802.1Qbh Detected by Coverity. Leak present since commit ca3b22b. * src/util/macvtap.c (doPortProfileOp8021Qbh): Release device name. --- diff --git a/src/util/macvtap.c b/src/util/macvtap.c index 9bf7fa6bcd..a020c9058b 100644 --- a/src/util/macvtap.c +++ b/src/util/macvtap.c @@ -993,7 +993,7 @@ doPortProfileOp8021Qbh(const char *ifname, # else /* IFLA_VF_PORT_MAX */ - char *physfndev; + char *physfndev = NULL; unsigned char hostuuid[VIR_UUID_BUFLEN]; int32_t vf; bool nltarget_kernel = true; @@ -1059,6 +1059,7 @@ doPortProfileOp8021Qbh(const char *ifname, } err_exit: + VIR_FREE(physfndev); # endif /* IFLA_VF_PORT_MAX */