Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
cron: fix the cron_multi_set memory allocation - fixes #2273
  • Loading branch information
perexg committed Sep 8, 2014
1 parent ba01c10 commit 4963d4c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cron.c
Expand Up @@ -176,7 +176,7 @@ cron_multi_set ( const char *str )
if (line[0] != '#')
if (!cron_set(&cron, line)) {
count++;
cm2 = realloc(cm, sizeof(cm) + sizeof(cron) * count);
cm2 = realloc(cm, sizeof(*cm) + sizeof(cron) * count);
if (cm2 == NULL) {
free(cm);
return NULL;
Expand Down

0 comments on commit 4963d4c

Please sign in to comment.