summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAurelien Foret <aurelien@archlinux.org>2005-05-04 21:20:43 +0000
committerAurelien Foret <aurelien@archlinux.org>2005-05-04 21:20:43 +0000
commit0e72c49921c6cd492aa15bfe8bf1f46da767b320 (patch)
treeeee638fa3096657e6e90489c3ec0871869e679ec /lib
parent9f1df56353b0683fd3c519224f3705202061d918 (diff)
downloadpacman-0e72c49921c6cd492aa15bfe8bf1f46da767b320.tar.xz
fixed a pointer error
Diffstat (limited to 'lib')
-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);
}