diff options
author | Allan McRae <allan@archlinux.org> | 2014-12-22 00:39:10 +1000 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2014-12-24 11:19:29 +1000 |
commit | 895780bd9aa53c0767a9067a166c60b5b0569c6d (patch) | |
tree | 17dcea0ab42cf40a5e5d8ec32ec7c645d69a1175 /lib/libalpm | |
parent | 87e55a4ee7a92ab7510fd268717d21dbba6f5cf6 (diff) | |
download | pacman-895780bd9aa53c0767a9067a166c60b5b0569c6d.tar.xz |
_alpm_db_new: free memory on error
Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'lib/libalpm')
-rw-r--r-- | lib/libalpm/db.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libalpm/db.c b/lib/libalpm/db.c index 11e3a3b0..0ca12d70 100644 --- a/lib/libalpm/db.c +++ b/lib/libalpm/db.c @@ -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 { |