From 0472f39f8b7a7251c36fc3d12fad20085541035a Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Thu, 13 Oct 2011 16:45:58 -0600 Subject: [PATCH] macvtap: plug memory leak for 802.1Qbh Detected by Coverity. Leak present since commit ca3b22b. * src/util/macvtap.c (doPortProfileOp8021Qbh): Release device name. --- src/util/macvtap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 */