]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
locking: Resolve resource leaks on non error path
authorJohn Ferlan <jferlan@redhat.com>
Tue, 15 Jan 2013 14:23:29 +0000 (09:23 -0500)
committerJán Tomko <jtomko@redhat.com>
Wed, 16 Jan 2013 16:51:30 +0000 (17:51 +0100)
Both 'dir' and 'path' were not free'd on successful return

src/locking/lock_driver_sanlock.c

index d06fa661f0a5618240ee029391abec850f37a1fd..0b7c6d5edaa26f05b0ff0b4b4a88742bd3c0e5d2 100644 (file)
@@ -365,6 +365,8 @@ retry:
         VIR_DEBUG("Lockspace %s has been registered", path);
     }
 
+    VIR_FREE(path);
+    VIR_FREE(dir);
     return 0;
 
 error_unlink: