summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libalpm/util.c')
-rw-r--r--lib/libalpm/util.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libalpm/util.c b/lib/libalpm/util.c
index cebc87ec..cb838e43 100644
--- a/lib/libalpm/util.c
+++ b/lib/libalpm/util.c
@@ -350,7 +350,8 @@ int _alpm_unpack(alpm_handle_t *handle, const char *path, const char *prefix,
/* If specific files were requested, skip entries that don't match. */
if(list) {
- char *entry_prefix = strdup(entryname);
+ char *entry_prefix = NULL;
+ STRDUP(entry_prefix, entryname, ret = 1; goto cleanup);
char *p = strstr(entry_prefix,"/");
if(p) {
*(p + 1) = '\0';