[PATCH 14/23] Fix leak in virLockSpaceResourceFree

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

 



From: "Daniel P. Berrange" <berrange@xxxxxxxxxx>

Normally a lockspace resource is not freed while there are
active owners. During initial resource creation though, an
OOM error will trigger this scenario. virLockSpaceResourceFree
was not freeing the 'owners' field in this case.

Signed-off-by: Daniel P. Berrange <berrange@xxxxxxxxxx>
---
 src/util/virlockspace.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/util/virlockspace.c b/src/util/virlockspace.c
index afb1abb..cab7775 100644
--- a/src/util/virlockspace.c
+++ b/src/util/virlockspace.c
@@ -102,6 +102,7 @@ static void virLockSpaceResourceFree(virLockSpaceResourcePtr res)
         }
     }
 
+    VIR_FREE(res->owners);
     VIR_FORCE_CLOSE(res->fd);
     VIR_FREE(res->path);
     VIR_FREE(res->name);
-- 
1.8.3.1

--
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]