mirror of
https://dev.iopsys.eu/bbf/bbfdm.git
synced 2025-12-10 07:44:39 +01:00
Fix segfault while loading json plugins
This commit is contained in:
parent
8ed9c7bb5f
commit
48bbad8151
1 changed files with 3 additions and 0 deletions
|
|
@ -220,6 +220,9 @@ int load_json_plugin(struct list_head *json_plugin, struct list_head *json_list,
|
|||
return -1;
|
||||
}
|
||||
|
||||
if (idx == 0) {
|
||||
memset(&dm_entryobj[idx], 0, sizeof(DMOBJ));
|
||||
}
|
||||
memset(&dm_entryobj[idx + 1], 0, sizeof(DMOBJ));
|
||||
|
||||
dm_entryobj[idx].obj = dm_dynamic_strdup(json_memhead, obj_prefix);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue