diff options
Diffstat (limited to 'lib/libalpm/graph.c')
-rw-r--r-- | lib/libalpm/graph.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/lib/libalpm/graph.c b/lib/libalpm/graph.c index 2e2ba236..fc2c9e16 100644 --- a/lib/libalpm/graph.c +++ b/lib/libalpm/graph.c @@ -27,25 +27,14 @@ pmgraph_t *_alpm_graph_new(void) { pmgraph_t *graph = NULL; - CALLOC(graph, 1, sizeof(pmgraph_t), RET_ERR(PM_ERR_MEMORY, NULL)); + CALLOC(graph, 1, sizeof(pmgraph_t), return NULL); return graph; } void _alpm_graph_free(void *data) { pmgraph_t *graph = data; - /* make my children forget about me */ - for(alpm_list_t *i = graph->children; i; i = i->next) { - pmgraph_t *child = i->data; - child->parent = NULL; - } alpm_list_free(graph->children); - /* and make my parents forget about me too */ - if(graph->parent) { - alpm_list_t *me = alpm_list_find_ptr(graph->parent->children, &data); - graph->parent->children = alpm_list_remove_item(graph->parent->children, - me); - } free(graph); } |