Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Only prepare the trigger hashtable if we are going to use it
Baptiste Daroussin committed 5 years ago
commit b896175fae00c83888659c551e83828b7502423b
parent 1c452e9
1 file changed +4 -2
modified libpkg/triggers.c
@@ -378,8 +378,10 @@ triggers_execute(struct trigger *cleanup_triggers)
	/*
	 * Generate a hash table to ease the lookup later
	 */
-
	LL_FOREACH(triggers, t) {
-
		kh_add(strings, th, t->name, t->name, free);
+
	if (cleanup_triggers != NULL) {
+
		LL_FOREACH(triggers, t) {
+
			kh_add(strings, th, t->name, t->name, free);
+
		}
	}

	/*