From 738a11dcdc96f29b9839dee58fb95e866960986f Mon Sep 17 00:00:00 2001 From: Gao feng Date: Thu, 12 Nov 2015 16:02:28 +0800 Subject: [PATCH] initialize container in parse_new_container fix the possible free incorrect memory. Signed-off-by: Gao feng --- src/parse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/parse.c b/src/parse.c index 7ca28c2..621379d 100644 --- a/src/parse.c +++ b/src/parse.c @@ -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));