summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/libalpm/be_sync.c1
-rw-r--r--lib/libalpm/graph.c11
-rwxr-xr-xtest/pacman/pmpkg.py4
3 files changed, 3 insertions, 13 deletions
diff --git a/lib/libalpm/be_sync.c b/lib/libalpm/be_sync.c
index aeba86f1..0c50c424 100644
--- a/lib/libalpm/be_sync.c
+++ b/lib/libalpm/be_sync.c
@@ -498,6 +498,7 @@ static int sync_db_read(pmdb_t *db, struct archive *archive,
_alpm_log(PM_LOG_DEBUG, "unknown database file: %s\n", filename);
}
+ FREE(pkgname);
return 0;
error:
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);
}
diff --git a/test/pacman/pmpkg.py b/test/pacman/pmpkg.py
index 42573428..4568adb9 100755
--- a/test/pacman/pmpkg.py
+++ b/test/pacman/pmpkg.py
@@ -63,7 +63,7 @@ class pmpkg(object):
"pre_remove": "",
"post_remove": "",
"pre_upgrade": "",
- "post_upgrade": ""
+ "post_upgrade": "",
}
def __str__(self):
@@ -134,7 +134,7 @@ class pmpkg(object):
util.mkfile(".PKGINFO", "\n".join(data))
# .INSTALL
- if len(self.install.values()) > 0:
+ if any(self.install.values()):
util.mkinstallfile(".INSTALL", self.install)
# safely create the dir