From: John Ferlan Date: Tue, 15 Jan 2013 14:23:29 +0000 (-0500) Subject: locking: Resolve resource leaks on non error path X-Git-Tag: v1.0.2-rc1~128 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=687554cd503b210347582e63c31c87f5bbb2f7ba;p=thirdparty%2Flibvirt.git locking: Resolve resource leaks on non error path Both 'dir' and 'path' were not free'd on successful return --- 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: