summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/backup.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libalpm/backup.c')
-rw-r--r--lib/libalpm/backup.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/libalpm/backup.c b/lib/libalpm/backup.c
index aeb41316..5ccec036 100644
--- a/lib/libalpm/backup.c
+++ b/lib/libalpm/backup.c
@@ -1,7 +1,7 @@
/*
* backup.c
*
- * Copyright (c) 2006-2014 Pacman Development Team <pacman-dev@archlinux.org>
+ * Copyright (c) 2006-2015 Pacman Development Team <pacman-dev@archlinux.org>
* Copyright (c) 2005 by Judd Vinet <jvinet@zeroflux.org>
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
* Copyright (c) 2005 by Christian Hamar <krics@linuxforum.hu>
@@ -47,11 +47,10 @@ int _alpm_split_backup(const char *string, alpm_backup_t **backup)
*ptr = '\0';
ptr++;
/* now str points to the filename and ptr points to the hash */
- STRDUP((*backup)->name, str, return -1);
- STRDUP((*backup)->hash, ptr, return -1);
+ STRDUP((*backup)->name, str, FREE(str); return -1);
+ STRDUP((*backup)->hash, ptr, FREE(str); return -1);
FREE(str);
- return 0;
-}
+ return 0;}
/* Look for a filename in a alpm_pkg_t.backup list. If we find it,
* then we return the full backup entry.