[FIX] free allocated memory if parse user space fail
authorVitaliy Cherepanov <v.cherepanov@samsung.com>
Mon, 12 Aug 2013 08:17:42 +0000 (12:17 +0400)
committerVitaliy Cherepanov <v.cherepanov@samsung.com>
Mon, 12 Aug 2013 08:17:42 +0000 (12:17 +0400)
daemon/da_protocol.c

index 3f35b48..086eddf 100644 (file)
@@ -466,6 +466,7 @@ int parse_user_space_inst(struct msg_buf_t *msg,
                for ( i = 0; i < num; i++){
                        if (!parse_app_inst( msg, &(list[i]) )){
                                LOGE("parse app inst #%d failed\n", i + 1);
+                               free(list);
                                return 0;
                        }
                };