]> xenbits.xensource.com Git - libvirt.git/commitdiff
sanlock: Avoid freeing uninitialized value
authorJiri Denemark <jdenemar@redhat.com>
Wed, 3 Sep 2014 11:18:59 +0000 (13:18 +0200)
committerJiri Denemark <jdenemar@redhat.com>
Wed, 3 Sep 2014 13:22:10 +0000 (15:22 +0200)
https://bugzilla.redhat.com/show_bug.cgi?id=1136788
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
src/locking/lock_driver_sanlock.c

index aade437e5eb8bc6f1a97cf4a4bcea4afe464969e..aa6b8fb189ebcbfb05c0bdd8c11d47287c4e18b0 100644 (file)
@@ -885,7 +885,7 @@ static int virLockManagerSanlockAcquire(virLockManagerPtr lock,
                                         int *fd)
 {
     virLockManagerSanlockPrivatePtr priv = lock->privateData;
-    struct sanlk_options *opt;
+    struct sanlk_options *opt = NULL;
     struct sanlk_resource **res_args;
     int res_count;
     bool res_free = false;