summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-06-08 09:47:26 +0200
committerDan McGee <dan@archlinux.org>2011-06-08 09:49:03 +0200
commit11ba7a0e8a253bff53778688ee174f42c1513738 (patch)
treee00389ff763394c6bc519be76da1aa8550e40fd6 /lib
parentbeffab02c41251d4d05d29c0eebbe5a6b6997095 (diff)
downloadpacman-11ba7a0e8a253bff53778688ee174f42c1513738.tar.gz
pacman-11ba7a0e8a253bff53778688ee174f42c1513738.tar.xz
Fix graph free valgrind warnings
Due to the way we set up the graph structure, we don't always have good parent information. The changes made in dd8cf0c12dd5e assumed this, so back them out and just live with the dead pointers being there in the memory while we are cleaning up after ourselves. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/libalpm/graph.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/lib/libalpm/graph.c b/lib/libalpm/graph.c
index 2e2ba236..15ff9354 100644
--- a/lib/libalpm/graph.c
+++ b/lib/libalpm/graph.c
@@ -34,18 +34,7 @@ pmgraph_t *_alpm_graph_new(void)
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);
}