diff options
author | chanywa <cbible.kim@samsung.com> | 2016-06-15 21:35:07 +0900 |
---|---|---|
committer | chanywa <cbible.kim@samsung.com> | 2016-06-16 09:02:39 +0900 |
commit | 8b0589afbdd8140bf3ecae73a9a0dd923845947a (patch) | |
tree | 9ee333c2451a94432734ccf99aca572615563fb2 | |
parent | a5ed7546fb5b108b19232aaad05cfad283bf2ac0 (diff) | |
download | geofence-dbus-8b0589afbdd8140bf3ecae73a9a0dd923845947a.tar.gz geofence-dbus-8b0589afbdd8140bf3ecae73a9a0dd923845947a.tar.bz2 geofence-dbus-8b0589afbdd8140bf3ecae73a9a0dd923845947a.zip |
fixed memory leakssubmit/tizen/20160616.013849accepted/tizen/mobile/20160616.105040accepted/tizen/ivi/20160616.105046accepted/tizen/common/20160616.151820
Change-Id: I26e12e5f8fdeb7be3740329aebf344add1b01ff5
-rw-r--r-- | geofence/src/geofence_client.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/geofence/src/geofence_client.c b/geofence/src/geofence_client.c index 7b3e7db..dea6dd1 100644 --- a/geofence/src/geofence_client.c +++ b/geofence/src/geofence_client.c @@ -100,6 +100,7 @@ EXPORT_API int geo_client_delete_geofence(geofence_client_dbus_h geofence_client proxy = g_dbus_proxy_new_sync(handle->conn, G_DBUS_PROXY_FLAGS_NONE, NULL, handle->service_name, handle->signal_path, GEOFENCE_INTERFACE_NAME, NULL, &error); if (proxy) { g_dbus_proxy_call(proxy, "DeleteGeofence", g_variant_new("(is)", fence_id, app_id), G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL, &error); + g_object_unref(proxy); } else { if (error) { GEOFENCE_CLIENT_LOGE("Fail to get proxy Error[%s]", error->message); @@ -172,6 +173,7 @@ EXPORT_API int geo_client_enable_geofence(geofence_client_dbus_h geofence_client proxy = g_dbus_proxy_new_sync(handle->conn, G_DBUS_PROXY_FLAGS_NONE, NULL, handle->service_name, handle->signal_path, GEOFENCE_INTERFACE_NAME, NULL, &error); if (proxy) { g_dbus_proxy_call(proxy, "EnableGeofence", g_variant_new("(isb)", geofence_id, app_id, onoff), G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL, &error); + g_object_unref(proxy); } else { if (error) { GEOFENCE_CLIENT_LOGE("Fail to get proxy Error[%s]", error->message); @@ -198,6 +200,7 @@ EXPORT_API int geo_client_start_geofence(geofence_client_dbus_h geofence_client, proxy = g_dbus_proxy_new_sync(handle->conn, G_DBUS_PROXY_FLAGS_NONE, NULL, handle->service_name, handle->signal_path, GEOFENCE_INTERFACE_NAME, NULL, &error); if (proxy) { g_dbus_proxy_call(proxy, "StartGeofence", g_variant_new("(is)", geofence_id, app_id), G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL, &error); + g_object_unref(proxy); } else { if (error) { GEOFENCE_CLIENT_LOGE("Fail to get proxy Error[%s]", error->message); @@ -223,6 +226,7 @@ EXPORT_API int geo_client_stop_geofence(geofence_client_dbus_h geofence_client, proxy = g_dbus_proxy_new_sync(handle->conn, G_DBUS_PROXY_FLAGS_NONE, NULL, handle->service_name, handle->signal_path, GEOFENCE_INTERFACE_NAME, NULL, &error); if (proxy) { g_dbus_proxy_call(proxy, "StopGeofence", g_variant_new("(is)", geofence_id, app_id), G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL, &error); + g_object_unref(proxy); } else { if (error) { GEOFENCE_CLIENT_LOGE("Fail to get proxy Error[%s]", error->message); @@ -290,6 +294,7 @@ EXPORT_API int geo_client_update_place(geofence_client_dbus_h geofence_client, g proxy = g_dbus_proxy_new_sync(handle->conn, G_DBUS_PROXY_FLAGS_NONE, NULL, handle->service_name, handle->signal_path, GEOFENCE_INTERFACE_NAME, NULL, &error); if (proxy) { g_dbus_proxy_call(proxy, "UpdatePlace", g_variant_new("(iss)", place_id, app_id, place_name), G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL, &error); + g_object_unref(proxy); } else { if (error) { GEOFENCE_CLIENT_LOGE("Fail to get proxy Error[%s]", error->message); @@ -312,8 +317,10 @@ EXPORT_API int geo_client_delete_place(geofence_client_dbus_h geofence_client, g int ret = GEOFENCE_CLIENT_ERROR_NONE; proxy = g_dbus_proxy_new_sync(handle->conn, G_DBUS_PROXY_FLAGS_NONE, NULL, handle->service_name, handle->signal_path, GEOFENCE_INTERFACE_NAME, NULL, &error); - if (proxy) + if (proxy) { g_dbus_proxy_call(proxy, "DeletePlace", g_variant_new("(is)", place_id, app_id), G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL, &error); + g_object_unref(proxy); + } else { if (error) { GEOFENCE_CLIENT_LOGE("Fail to get proxy Error[%s]", error->message); |