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 <clalance@redhat.com>
This commit is contained in:
Charles Duffy 2009-09-24 12:58:53 +02:00 committed by Chris Lalancette
parent 580ad29288
commit ce37c3a109
1 changed files with 1 additions and 1 deletions

View 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;