diff options
-rw-r--r-- | daemon/da_inst.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/daemon/da_inst.c b/daemon/da_inst.c index 119f412..cec0649 100644 --- a/daemon/da_inst.c +++ b/daemon/da_inst.c @@ -743,6 +743,10 @@ static void generate_type_and_info(struct user_space_inst_t *us_inst) free(lib_maps_message); lib_maps_message = malloc(total_len); + if (!lib_maps_message) { + LOGE("Can't allocate memory for lib_maps_message\n"); + goto unlock_lib_maps_msg; + } lib_maps_message->type = APP_MSG_TYPE_AND_INFO; lib_maps_message->length = total_len; @@ -769,6 +773,7 @@ static void generate_type_and_info(struct user_space_inst_t *us_inst) LOGI("total_len = %u\n", total_len); print_buf((char *)lib_maps_message, total_len, "lib_maps_message"); +unlock_lib_maps_msg: unlock_lib_maps_message(); } |