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
parent
efdd2f10f5
commit
ec6359732d
|
@ -2113,6 +2113,7 @@ int apk_db_install_pkg(struct apk_database *db,
|
||||||
ipkg->flags |= APK_IPKGF_RUN_ALL_TRIGGERS;
|
ipkg->flags |= APK_IPKGF_RUN_ALL_TRIGGERS;
|
||||||
if (ipkg->triggers->num != 0) {
|
if (ipkg->triggers->num != 0) {
|
||||||
list_del(&ipkg->trigger_pkgs_list);
|
list_del(&ipkg->trigger_pkgs_list);
|
||||||
|
list_init(&ipkg->trigger_pkgs_list);
|
||||||
apk_string_array_free(&ipkg->triggers);
|
apk_string_array_free(&ipkg->triggers);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue