From 687554cd503b210347582e63c31c87f5bbb2f7ba Mon Sep 17 00:00:00 2001 From: John Ferlan Date: Tue, 15 Jan 2013 09:23:29 -0500 Subject: [PATCH] locking: Resolve resource leaks on non error path Both 'dir' and 'path' were not free'd on successful return --- src/locking/lock_driver_sanlock.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/locking/lock_driver_sanlock.c b/src/locking/lock_driver_sanlock.c index d06fa661f0..0b7c6d5eda 100644 --- a/src/locking/lock_driver_sanlock.c +++ b/src/locking/lock_driver_sanlock.c @@ -365,6 +365,8 @@ retry: VIR_DEBUG("Lockspace %s has been registered", path); } + VIR_FREE(path); + VIR_FREE(dir); return 0; error_unlink: -- GitLab