]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Fix secret_driver compile warning, bug.
authorCharles Duffy <charles@dyfis.net>
Thu, 24 Sep 2009 10:58:53 +0000 (12:58 +0200)
committerChris Lalancette <clalance@redhat.com>
Thu, 24 Sep 2009 10:58:53 +0000 (12:58 +0200)
Set def to NULL in secretLoad(), otherwise we can access a
random pointer on error.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
src/secret/secret_driver.c

index 20a3fa8658633252551c02de75a472f9177ca058..9c4102e7e4cf5f74533aec83e388b1441c1e11cd 100644 (file)
@@ -432,7 +432,7 @@ static virSecretEntryPtr
 secretLoad(virConnectPtr conn, virSecretDriverStatePtr driver,
            const char *xml_basename)
 {
-    virSecretDefPtr def;
+    virSecretDefPtr def = NULL;
     virSecretEntryPtr secret = NULL, ret = NULL;
     char *xml_filename;