summaryrefslogtreecommitdiff
path: root/lib/libalpm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libalpm')
-rw-r--r--lib/libalpm/backup.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libalpm/backup.c b/lib/libalpm/backup.c
index 40a66dcf..f403469b 100644
--- a/lib/libalpm/backup.c
+++ b/lib/libalpm/backup.c
@@ -51,8 +51,9 @@ char *_alpm_needbackup(char *file, PMList *backup)
ptr++;
/* now str points to the filename and ptr points to the md5 hash */
if(!strcmp(file, str)) {
+ char *md5 = strdup(ptr);
free(str);
- return(strdup(ptr));
+ return(md5);
}
free(str);
}