[PATCH 04/14] util: Resolve resource leak for 'res' in virSetInherit error path.

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

 



---
 src/util/virlockspace.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/util/virlockspace.c b/src/util/virlockspace.c
index 9ada6a6..04aeebe 100644
--- a/src/util/virlockspace.c
+++ b/src/util/virlockspace.c
@@ -387,6 +387,7 @@ virLockSpacePtr virLockSpaceNewPostExecRestart(virJSONValuePtr object)
         if (virSetInherit(res->fd, false) < 0) {
             virReportSystemError(errno, "%s",
                                  _("Cannot enable close-on-exec flag"));
+            virLockSpaceResourceFree(res);
             goto error;
         }
         if (virJSONValueObjectGetBoolean(child, "lockHeld", &res->lockHeld) < 0) {
-- 
1.7.11.7

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]