[FIX] verification of dedicated memory
authorVyacheslav Cherkashin <v.cherkashin@samsung.com>
Wed, 3 Jul 2013 12:50:00 +0000 (16:50 +0400)
committerVyacheslav Cherkashin <v.cherkashin@samsung.com>
Wed, 3 Jul 2013 12:50:00 +0000 (16:50 +0400)
parser/msg_parser.c

index 5f2c628..94d2181 100644 (file)
@@ -210,11 +210,11 @@ struct lib_inst_data *create_lib_inst_data(struct msg_buf *mb)
                return NULL;
 
        li = kmalloc(sizeof(*li), GFP_KERNEL);
-       if (li)
+       if (li == NULL)
                goto free_path;
 
        li->func = kmalloc(sizeof(struct func_inst_data *) * cnt, GFP_KERNEL);
-       if (li->cnt_func)
+       if (li->func == NULL)
                goto free_li;
 
        for (i = 0; i < cnt; ++i) {