[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH 5/6] util: Plug memory leak on virNetDevBridgeGet() sucessful path



From: Alex Jia <ajia redhat com>

Detected by Coverity. Leak introduced in commit c1df2c1.

Signed-off-by: Alex Jia <ajia redhat com>
---
 src/util/virnetdevbridge.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/util/virnetdevbridge.c b/src/util/virnetdevbridge.c
index 060445d..d9708fa 100644
--- a/src/util/virnetdevbridge.c
+++ b/src/util/virnetdevbridge.c
@@ -168,6 +168,7 @@ static int virNetDevBridgeGet(const char *brname,
             virReportSystemError(EINVAL,
                                  _("Unable to get bridge %s %s"), brname, paramname);
         }
+        VIR_FREE(valuestr);
     } else {
         struct __bridge_info info;
         unsigned long args[] = { BRCTL_GET_BRIDGE_INFO, (unsigned long)&info, 0, 0 };
-- 
1.7.1


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]