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:
Gao feng
2015-11-12 16:02:28 +08:00
parent 280bc617d0
commit 738a11dcdc
+1 -1
View File
@@ -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));