From 06bfe6fe2b6396c48d1c98eaea409d15ac9f7bb7 Mon Sep 17 00:00:00 2001 From: "Daniel P. Berrange" Date: Wed, 25 Sep 2013 15:17:51 +0100 Subject: [PATCH] Fix leak in virLockSpaceResourceFree 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 --- src/util/virlockspace.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/util/virlockspace.c b/src/util/virlockspace.c index afb1abbbbb..cab7775c7a 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); -- GitLab