_alpm_db_new: free memory on error
Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
87e55a4ee7
commit
895780bd9a
1 changed files with 1 additions and 1 deletions
|
@ -331,7 +331,7 @@ alpm_db_t *_alpm_db_new(const char *treename, int is_local)
|
|||
alpm_db_t *db;
|
||||
|
||||
CALLOC(db, 1, sizeof(alpm_db_t), return NULL);
|
||||
STRDUP(db->treename, treename, return NULL);
|
||||
STRDUP(db->treename, treename, FREE(db); return NULL);
|
||||
if(is_local) {
|
||||
db->status |= DB_STATUS_LOCAL;
|
||||
} else {
|
||||
|
|
Loading…
Add table
Reference in a new issue