From 10b0e0d9af0e396d30f6fb1f5d321488897746d3 Mon Sep 17 00:00:00 2001 From: Aurelien Foret Date: Sat, 26 Mar 2005 09:00:49 +0000 Subject: Backport from pacman 2.9.5 --- lib/libalpm/list.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/libalpm/list.c') diff --git a/lib/libalpm/list.c b/lib/libalpm/list.c index 9b3b11e9..8fda583f 100644 --- a/lib/libalpm/list.c +++ b/lib/libalpm/list.c @@ -89,6 +89,9 @@ PMList* pm_list_add(PMList *list, void *data) ptr = list; if(ptr == NULL) { ptr = pm_list_new(); + if(ptr == NULL) { + return(NULL); + } } lp = pm_list_last(ptr); -- cgit v1.2.3