summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/libalpm/list.h11
1 files changed, 4 insertions, 7 deletions
diff --git a/lib/libalpm/list.h b/lib/libalpm/list.h
index e9bb173e..d1cdb385 100644
--- a/lib/libalpm/list.h
+++ b/lib/libalpm/list.h
@@ -33,14 +33,11 @@ typedef struct __pmlist_t PMList;
#define FREELIST(p) do { if(p) { pm_list_free(p); p = NULL; } } while(0)
#define FREELISTPTR(p) do { \
- if(p) { \
- PMList *i; \
- for(i = p; i; i = i->next) { \
- i->data = NULL; \
- } \
- pm_list_free(p); \
- p = NULL; \
+ PMList *i; \
+ for(i = p; i; i = i->next) { \
+ i->data = NULL; \
} \
+ FREELIST(p); \
} while(0)
/* Sort comparison callback function declaration */