mirror of
https://github.com/clearlinux/hyperstart.git
synced 2026-09-03 20:21:47 +00:00
initialize container in parse_new_container
fix the possible free incorrect memory. Signed-off-by: Gao feng <omarapazanadi@gmail.com>
This commit is contained in:
+1
-1
@@ -575,7 +575,7 @@ struct hyper_container *hyper_parse_new_container(struct hyper_pod *pod, char *j
|
||||
jsmn_parser p;
|
||||
int toks_num = 100;
|
||||
jsmntok_t *toks = NULL;
|
||||
struct hyper_container *c;
|
||||
struct hyper_container *c = NULL;
|
||||
|
||||
realloc:
|
||||
toks = realloc(toks, toks_num * sizeof(jsmntok_t));
|
||||
|
||||
Reference in New Issue
Block a user