From 4ba518a35cbe4deaee782d5ea60d52fbca163c55 Mon Sep 17 00:00:00 2001 From: Vyacheslav Cherkashin Date: Fri, 13 Dec 2013 15:34:34 +0400 Subject: [PATCH] [FIX] clean up when error in create_lib_inst_data() Change-Id: Ia2324e9b25bfcd34220bfcbacbf5044e2b744511 Signed-off-by: Vyacheslav Cherkashin --- parser/msg_parser.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/parser/msg_parser.c b/parser/msg_parser.c index 3335732..fa71e57 100644 --- a/parser/msg_parser.c +++ b/parser/msg_parser.c @@ -285,12 +285,12 @@ struct lib_inst_data *create_lib_inst_data(struct msg_buf *mb) print_parse_debug("func count:"); if (get_u32(mb, &cnt)) { print_err("failed to read count of functions\n"); - return NULL; + goto free_path; } if (remained_mb(mb) / MIN_SIZE_FUNC_INST < cnt) { print_err("to match count of functions(%u)\n", cnt); - return NULL; + goto free_path; } li = kmalloc(sizeof(*li), GFP_KERNEL); -- 2.7.4