summaryrefslogtreecommitdiff
path: root/src/package.c
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2010-06-01 16:46:53 +0300
committerTimo Teräs <timo.teras@iki.fi>2010-06-01 16:46:53 +0300
commitce3cf8bff901e7fcacbca640ffedaeea2b3bdf7f (patch)
tree4b218df4631da29ddaf80c4514430f43f93ed29f /src/package.c
parent440cffef5891dab07631e17f83845f9f95f89b0d (diff)
downloadapk-tools-ce3cf8bff901e7fcacbca640ffedaeea2b3bdf7f.tar.gz
apk-tools-ce3cf8bff901e7fcacbca640ffedaeea2b3bdf7f.tar.bz2
apk-tools-ce3cf8bff901e7fcacbca640ffedaeea2b3bdf7f.tar.xz
apk-tools-ce3cf8bff901e7fcacbca640ffedaeea2b3bdf7f.zip
db, pkg: fix triggers related crash
clean up the triggers properly, in proper order.
Diffstat (limited to 'src/package.c')
-rw-r--r--src/package.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/package.c b/src/package.c
index b608fb8..cc79d05 100644
--- a/src/package.c
+++ b/src/package.c
@@ -92,6 +92,7 @@ void apk_pkg_uninstall(struct apk_database *db, struct apk_package *pkg)
if (ipkg->triggers) {
list_del(&ipkg->trigger_pkgs_list);
+ list_init(&ipkg->trigger_pkgs_list);
for (i = 0; i < ipkg->triggers->num; i++)
free(ipkg->triggers->item[i]);
free(ipkg->triggers);