summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Kovalenko <d.kovalenko@samsung.com>2017-08-15 11:15:02 +0300
committerDmitry Kovalenko <d.kovalenko@samsung.com>2017-08-15 15:20:08 +0300
commit17f6585c902608df46dde19f6a5d799ef7bc8e02 (patch)
treede3525d46cc7363aee3c294c0e5cb946af7bc1a5
parentb3629d8ff70c14e68ac5b3737e68e488dae17410 (diff)
downloadswap-manager-accepted/tizen_3.0_wearable.tar.gz
swap-manager-accepted/tizen_3.0_wearable.tar.bz2
swap-manager-accepted/tizen_3.0_wearable.zip
Change-Id: Ie9bc610addf071bf9202e38e24ca17c9cf813dca Signed-off-by: Dmitry Kovalenko <d.kovalenko@samsung.com>
-rw-r--r--daemon/da_inst.c5
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();
}