db: reinitialize trigger_pkg_list node after deletion

The trigger list can be reused after it's cleared, make sure
the list node is initialized all the time.
cute-signatures
Timo Teräs 2010-06-15 14:40:46 +03:00
parent efdd2f10f5
commit ec6359732d
1 changed files with 1 additions and 0 deletions

View File

@ -2113,6 +2113,7 @@ int apk_db_install_pkg(struct apk_database *db,
ipkg->flags |= APK_IPKGF_RUN_ALL_TRIGGERS;
if (ipkg->triggers->num != 0) {
list_del(&ipkg->trigger_pkgs_list);
list_init(&ipkg->trigger_pkgs_list);
apk_string_array_free(&ipkg->triggers);
}