xbps_get_regpkgdb_dict(): fix two memleaks.

--HG--
extra : convert_revision : d66be453f2472e5fdb81b2810f1777166d9a04d3
This commit is contained in:
Juan RP 2009-05-17 07:18:19 +02:00
parent 4f0482c6ac
commit 1ff41ddbd7

View file

@ -214,11 +214,14 @@ xbps_get_regpkgdb_dict(void)
return NULL; return NULL;
regpkgdb_dict = prop_dictionary_internalize_from_file(plist); regpkgdb_dict = prop_dictionary_internalize_from_file(plist);
if (regpkgdb_dict == NULL) if (regpkgdb_dict == NULL) {
free(plist);
return NULL; return NULL;
}
free(plist);
} }
return prop_dictionary_copy(regpkgdb_dict); return regpkgdb_dict;
} }
void void