summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHyunho Kang <hhstark.kang@samsung.com>2016-11-08 16:36:55 +0900
committerHyunho Kang <hhstark.kang@samsung.com>2016-11-08 16:38:51 +0900
commitb6c2b539657af57394a3dde2b73a4cdf61844624 (patch)
tree6ed55b3e0b3e6da948f202f656aee8c865c62aef
parente44051626efd68d53fe3d16aa3584ce5f37fd8fc (diff)
downloadalarm-manager-accepted/tizen/3.0/ivi/20161110.020332.tar.gz
alarm-manager-accepted/tizen/3.0/ivi/20161110.020332.tar.bz2
alarm-manager-accepted/tizen/3.0/ivi/20161110.020332.zip
Change-Id: I58e5ba3102f62e6d006a718235eaca0c42bebb27 Signed-off-by: Hyunho Kang <hhstark.kang@samsung.com>
-rw-r--r--src/alarm-lib-stub.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/alarm-lib-stub.c b/src/alarm-lib-stub.c
index 4b9bc3f..cd7fd82 100644
--- a/src/alarm-lib-stub.c
+++ b/src/alarm-lib-stub.c
@@ -56,6 +56,11 @@ bool _send_alarm_create_noti(alarm_context_t context, alarm_info_t *alarm_info,
int datalen = 0;
noti_gv = notification_ipc_make_gvariant_from_noti(noti, true);
+ if (!noti_gv) {
+ if (error_code)
+ *error_code = ERR_ALARM_SYSTEM_FAIL;
+ return false;
+ }
datalen = g_variant_get_size(noti_gv);
if (datalen < 0)
@@ -65,13 +70,6 @@ bool _send_alarm_create_noti(alarm_context_t context, alarm_info_t *alarm_info,
if (!data)
return false;
- if (!noti_gv) {
- if (error_code)
- *error_code = ERR_ALARM_SYSTEM_FAIL;
- free(data);
- return false;
- }
-
g_variant_store(noti_gv, data);
noti_data = g_base64_encode((guchar *)data, datalen);