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

[libvirt] [PATCH 14/23] Fix leak in virLockSpaceResourceFree



From: "Daniel P. Berrange" <berrange redhat com>

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 redhat com>
---
 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


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