From 3b25b413d9af28155ba9440797c75ee62965d06b Mon Sep 17 00:00:00 2001 From: Yong Yeon Kim Date: Mon, 15 Apr 2013 10:53:52 +0900 Subject: [PATCH] fix prevent bugs Change-Id: I19b4ee7aefc9917e623383e9a3653efbb6f95533 --- lib/media-util-noti.c | 8 ++++---- packaging/media-server.spec | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/media-util-noti.c b/lib/media-util-noti.c index e1eafe4..2b41a92 100755 --- a/lib/media-util-noti.c +++ b/lib/media-util-noti.c @@ -170,7 +170,6 @@ int media_db_update_subscribe(db_update_cb user_cb, void *user_data) dbus_connection_setup_with_g_main (g_bus, NULL); - callback_data = malloc(sizeof(noti_callback_data)); MS_MALLOC(callback_data, sizeof(noti_callback_data)); if (callback_data == NULL) { MSAPI_DBG_ERR("MS_MALLOC failed"); @@ -225,6 +224,7 @@ int media_db_update_unsubscribe(void) dbus_connection_unref(g_bus); g_bus = NULL; + MS_SAFE_FREE(g_data_store); } ref_count --; @@ -263,11 +263,11 @@ int media_db_update_send(int pid, /* mandatory */ return MS_MEDIA_ERR_DBUS_GET; } - path_array = malloc(sizeof(unsigned char) * path_length); - memcpy(path_array, path, path_length); - message = dbus_message_new_signal (MS_MEDIA_DBUS_PATH, MS_MEDIA_DBUS_INTERFACE, MS_MEDIA_DBUS_NAME); if (message != NULL) { + path_array = malloc(sizeof(unsigned char) * path_length); + memcpy(path_array, path, path_length); + if (item == MS_MEDIA_ITEM_FILE) { MSAPI_DBG("FILE CHANGED"); if (uuid != NULL && mime_type != NULL) { diff --git a/packaging/media-server.spec b/packaging/media-server.spec index 94fbeb2..3e32c04 100755 --- a/packaging/media-server.spec +++ b/packaging/media-server.spec @@ -1,6 +1,6 @@ Name: media-server Summary: File manager service server. -Version: 0.2.42 +Version: 0.2.43 Release: 1 Group: utils License: Apache License, Version 2.0 -- 2.7.4