diff options
author | Hyerim Kim <rimi.kim@samsung.com> | 2016-03-17 19:35:23 +0900 |
---|---|---|
committer | Hyerim Kim <rimi.kim@samsung.com> | 2016-03-17 19:35:23 +0900 |
commit | 9e5f7db16509ace6ec5f3939486a9cbb1a69c135 (patch) | |
tree | bd8bc3f10cc5e025b1baaa513aa687624d32642c | |
parent | f9229fd3cebd8c191a77dffb2388505b25701258 (diff) | |
download | air_infosquare-9e5f7db16509ace6ec5f3939486a9cbb1a69c135.tar.gz air_infosquare-9e5f7db16509ace6ec5f3939486a9cbb1a69c135.tar.bz2 air_infosquare-9e5f7db16509ace6ec5f3939486a9cbb1a69c135.zip |
Modify svace issues - applying review commentssubmit/tizen/20160323.031342accepted/tizen/tv/20160323.073527
Signed-off-by: Hyerim Kim <rimi.kim@samsung.com>
Change-Id: If212e4dbdc1caaeaed2e88b9f95e529775e42bd9
-rwxr-xr-x | src/util.c | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -130,15 +130,16 @@ Evas_Object *util_show_notification_popup( notification_get_text(noti, NOTIFICATION_TEXT_TYPE_TITLE, &title); notification_get_text(noti, NOTIFICATION_TEXT_TYPE_CONTENT, &temp_content); - content = (char *)calloc(strlen(start_tag)+strlen(temp_content)+strlen(end_tag), sizeof(char)); - snprintf(content, strlen(start_tag)+strlen(temp_content)+strlen(end_tag), "%s%s%s", start_tag, temp_content, end_tag); + int buffer_size = strlen(start_tag)+strlen(temp_content)+strlen(end_tag); + + content = (char *)calloc(buffer_size+1, sizeof(char)); + snprintf(content, buffer_size, "%s%s%s", start_tag, temp_content, end_tag); /* Creating a Notification Window */ notification_popup = elm_win_add(NULL, "notification_popup", ELM_WIN_BASIC); if (notification_popup == NULL) { _ERR("elm_win_add failed"); - free(content); goto out; } @@ -147,7 +148,6 @@ Evas_Object *util_show_notification_popup( _ERR("evas_object_evas_get failed"); evas_object_del(notification_popup); notification_popup = NULL; - free(content); goto out; } @@ -156,7 +156,6 @@ Evas_Object *util_show_notification_popup( _ERR("ecore_evas_ecore_evas_get failed"); evas_object_del(notification_popup); notification_popup = NULL; - free(content); goto out; } @@ -230,6 +229,9 @@ Evas_Object *util_show_notification_popup( elm_win_activate(notification_popup); out: + if(content != NULL) + free(content); + return notification_popup; } |