summaryrefslogtreecommitdiff
path: root/lib/psm.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/psm.c')
-rw-r--r--lib/psm.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/psm.c b/lib/psm.c
index fffd7bbd1..74829d41f 100644
--- a/lib/psm.c
+++ b/lib/psm.c
@@ -1086,9 +1086,7 @@ static rpmRC runImmedTriggers(rpmpsm psm)
)
return rc;
- triggersRun = alloca(sizeof(*triggersRun) * numTriggerIndices);
- memset(triggersRun, 0, sizeof(*triggersRun) * numTriggerIndices);
-
+ triggersRun = xcalloc(numTriggerIndices, sizeof(*triggersRun));
{ Header sourceH = NULL;
int i;
@@ -1110,6 +1108,7 @@ static rpmRC runImmedTriggers(rpmpsm psm)
}
triggerIndices = hfd(triggerIndices, tit);
triggerNames = hfd(triggerNames, tnt);
+ free(triggersRun);
return rc;
}