From c8243bb8ed2908e92d311a32d15e797dc83ba633 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Wed, 14 Nov 2007 22:51:47 -0600 Subject: libalpm: change graph malloc to MALLOC macro Signed-off-by: Dan McGee --- lib/libalpm/deps.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/libalpm/deps.c b/lib/libalpm/deps.c index 509c2a67..548b643e 100644 --- a/lib/libalpm/deps.c +++ b/lib/libalpm/deps.c @@ -43,7 +43,8 @@ static pmgraph_t *_alpm_graph_new(void) { pmgraph_t *graph = NULL; - graph = (pmgraph_t *)malloc(sizeof(pmgraph_t)); + MALLOC(graph, sizeof(pmgraph_t), RET_ERR(PM_ERR_MEMORY, NULL)); + if(graph) { graph->state = 0; graph->data = NULL; -- cgit v1.2.3-24-g4f1b