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 <berrange@redhat.com>
This commit is contained in:
Daniel P. Berrange
2013-09-25 18:12:09 +01:00
parent ec48aaee23
commit 06bfe6fe2b
+1
View File
@@ -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);