Skip to content

Commit df3a8ec

Browse files
committed
Palloc for pointer array instead of struct array
1 parent 9d8f817 commit df3a8ec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/pg_cron.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1017,7 +1017,7 @@ PollForTasks(List *taskList)
10171017
int activeTaskCount = 0;
10181018
ListCell *taskCell = NULL;
10191019

1020-
polledTasks = (CronTask **) palloc0(taskCount * sizeof(CronTask));
1020+
polledTasks = (CronTask **) palloc0(taskCount * sizeof(CronTask *));
10211021
pollFDs = (struct pollfd *) palloc0(taskCount * sizeof(struct pollfd));
10221022

10231023
currentTime = GetCurrentTimestamp();

0 commit comments

Comments
 (0)