cron: fix the cron_multi_set memory allocation - fixes #2273
This commit is contained in:
parent
ba01c1000a
commit
4963d4c94d
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue