From 0eb1c7eaec142a2a847e2c841ebc89abf25cadde Mon Sep 17 00:00:00 2001 From: Jiyong Min Date: Thu, 10 Nov 2016 15:06:47 +0900 Subject: [PATCH] Modify memory allocation [Problem] Kona RQ161102-00322 Change-Id: Iea9f5534a2c671837b549e37b567dea6b6999c49 Signed-off-by: Jiyong Min --- packaging/capi-media-controller.spec | 2 +- svc/media_controller_svc.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/packaging/capi-media-controller.spec b/packaging/capi-media-controller.spec index f24276a..ce92e55 100644 --- a/packaging/capi-media-controller.spec +++ b/packaging/capi-media-controller.spec @@ -1,6 +1,6 @@ Name: capi-media-controller Summary: A media controller library in Tizen Native API -Version: 0.1.26 +Version: 0.1.27 Release: 1 Group: Multimedia/API License: Apache-2.0 diff --git a/svc/media_controller_svc.c b/svc/media_controller_svc.c index 3847b92..863e0bd 100644 --- a/svc/media_controller_svc.c +++ b/svc/media_controller_svc.c @@ -254,12 +254,11 @@ gboolean mc_svc_thread(void *data) mc_svc_data_t *mc_svc_data = NULL; uid_t uid = DEFAULT_USER_UID; - mc_svc_data = (mc_svc_data_t *)g_malloc(sizeof(mc_svc_data_t)); + mc_svc_data = (mc_svc_data_t *)calloc(1, sizeof(mc_svc_data_t)); if (mc_svc_data == NULL) { mc_error("Failed to allocate svc data"); return FALSE; } - memset(mc_svc_data, 0, sizeof(mc_svc_data_t)); ret = __mc_sys_get_uid(&uid); if (ret < 0) { -- 2.7.4