Ticket 8609: SPA of many parameters causes segmentation fault

This commit is contained in:
imen.bhiri 2016-02-18 16:18:49 +01:00
parent 802e10d750
commit 223e7616b8

View file

@ -259,7 +259,7 @@ void add_list_enabled_notify(char *param, char *notification, char *value)
dm_enabled_notify = calloc(1, sizeof(struct param_fault)); // Should be calloc and not dmcalloc
list_add_tail(&dm_enabled_notify->list, &list_enabled_notify);
dm_enabled_notify->name = strdup(param); // Should be strdup and not dmstrdup
dm_enabled_notify->value = strdup(value); // Should be strdup and not dmstrdup
dm_enabled_notify->value = value ? strdup(value) : strdup("");
dm_enabled_notify->notification = strdup(notification); // Should be strdup and not dmstrdup
}
@ -270,7 +270,7 @@ void add_list_enabled_lwnotify(char *param, char *notification, char *value)
dm_enabled_notify = calloc(1, sizeof(struct param_fault)); // Should be calloc and not dmcalloc
list_add_tail(&dm_enabled_notify->list, &list_enabled_lw_notify);
dm_enabled_notify->name = strdup(param); // Should be strdup and not dmstrdup
dm_enabled_notify->value = strdup(value); // Should be strdup and not dmstrdup
dm_enabled_notify->value = value ? strdup(value) : strdup(""); // Should be strdup and not dmstrdup
dm_enabled_notify->notification = strdup(notification); // Should be strdup and not dmstrdup
}
void del_list_enabled_notify(struct dm_enabled_notify *dm_enabled_notify)