From: Charles Duffy Date: Thu, 24 Sep 2009 10:58:53 +0000 (+0200) Subject: Fix secret_driver compile warning, bug. X-Git-Tag: v0.7.2~134 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ce37c3a1097e56b97df8c8621bac82698cdd6b82;p=thirdparty%2Flibvirt.git Fix secret_driver compile warning, bug. Set def to NULL in secretLoad(), otherwise we can access a random pointer on error. Signed-off-by: Chris Lalancette --- diff --git a/src/secret/secret_driver.c b/src/secret/secret_driver.c index 20a3fa8658..9c4102e7e4 100644 --- a/src/secret/secret_driver.c +++ b/src/secret/secret_driver.c @@ -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;