From: chanywa Date: Wed, 15 Jun 2016 12:35:20 +0000 (+0900) Subject: fixed memory leaks X-Git-Tag: accepted/tizen/common/20160616.151818^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=360a271e1344d728063748c301a16340c2dfd5a9;p=platform%2Fcore%2Flocation%2Fgeofence-server.git fixed memory leaks Change-Id: I741797ff81811664ca71a4208fda3e83f5ed1e14 --- diff --git a/geofence-server/src/geofence_server.c b/geofence-server/src/geofence_server.c index de4cc3f..c5e68c1 100644 --- a/geofence-server/src/geofence_server.c +++ b/geofence-server/src/geofence_server.c @@ -1689,10 +1689,11 @@ static int dbus_add_place_cb(const gchar *app_id, const gchar *place_name, gpoin if (ret != FENCE_ERR_NONE) { LOGI_GEOFENCE("Unable to add the place due to DB error"); __emit_fence_event(geofence_server, -1, -1, ACCESS_TYPE_UNKNOWN, app_id, GEOFENCE_SERVER_ERROR_DATABASE, GEOFENCE_MANAGE_PLACE_ADDED); + g_free(place_info); return -1; } __emit_fence_event(geofence_server, place_id, -1, place_info->access_type, app_id, GEOFENCE_SERVER_ERROR_NONE, GEOFENCE_MANAGE_PLACE_ADDED); - + g_free(place_info); return place_id; } @@ -2608,6 +2609,7 @@ static void __add_default_place(char *place_name) int ret = geofence_manager_set_place_info(place_info, &place_id); if (ret != FENCE_ERR_NONE) LOGI_GEOFENCE("Unable to add the default places due to DB error"); + g_free(place_info); } static void __init_geofencemanager(GeofenceServer *geofence_server)