From ce37c3a1097e56b97df8c8621bac82698cdd6b82 Mon Sep 17 00:00:00 2001 From: Charles Duffy Date: Thu, 24 Sep 2009 12:58:53 +0200 Subject: [PATCH] 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 --- src/secret/secret_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;