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

[libvirt] [PATCH 6/6] util: Plug memory leak on virNetDevMacVLanCreateWithVPortProfile() error path



From: Alex Jia <ajia redhat com>

Detected by Coverity. Leak introduced in commit 90074ec.

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

diff --git a/src/util/virnetdevmacvlan.c b/src/util/virnetdevmacvlan.c
index 12fc411..80a9f80 100644
--- a/src/util/virnetdevmacvlan.c
+++ b/src/util/virnetdevmacvlan.c
@@ -582,6 +582,7 @@ create_name:
         virNetDevError(VIR_ERR_INTERNAL_ERROR,
                        _("cannot set bandwidth limits on %s"),
                        cr_ifname);
+        VIR_FORCE_CLOSE(rc);
         rc = -1;
         goto disassociate_exit;
     }
-- 
1.7.1


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