From 0c5dbdbfeca8a26d015230a8edd6d7c4c91d386a Mon Sep 17 00:00:00 2001 From: Rikard Falkeborn Date: Sun, 25 Oct 2015 12:39:27 +0100 Subject: Alpm, check for NULL in free-functions Also, use FREE() instead of free() in _alpm_backup_free() to set the pointers to NULL. Signed-off-by: Rikard Falkeborn Signed-off-by: Allan McRae --- lib/libalpm/graph.c | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/libalpm/graph.c') diff --git a/lib/libalpm/graph.c b/lib/libalpm/graph.c index 4d58169c..7c3cce14 100644 --- a/lib/libalpm/graph.c +++ b/lib/libalpm/graph.c @@ -31,6 +31,7 @@ alpm_graph_t *_alpm_graph_new(void) void _alpm_graph_free(void *data) { + ASSERT(data != NULL, return); alpm_graph_t *graph = data; alpm_list_free(graph->children); free(graph); -- cgit v1.2.3-24-g4f1b