From: "Daniel P. Berrange" <[email protected]>

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 <[email protected]>
---
 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
[email protected]
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to