summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjongmun.woo <jongmun.woo@samsung.com>2016-03-24 16:18:08 +0900
committerjongmun.woo <jongmun.woo@samsung.com>2016-03-24 16:18:23 +0900
commitf0e1054d53ab28b5508441dc9932039a9edeb520 (patch)
tree06532b9405b75d0b3198ccb9599e7da2327cddc7
parentcacbc689a1e92ee10e6958dbdcbecd865f6bb487 (diff)
downloadgeofence-server-f0e1054d53ab28b5508441dc9932039a9edeb520.tar.gz
geofence-server-f0e1054d53ab28b5508441dc9932039a9edeb520.tar.bz2
geofence-server-f0e1054d53ab28b5508441dc9932039a9edeb520.zip
Signed-off-by: jongmun.woo <jongmun.woo@samsung.com> Change-Id: I92011c7839df56b074847f1e4834f4af25e841cf
-rw-r--r--module/module_geofence_server.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/module/module_geofence_server.c b/module/module_geofence_server.c
index 2944c3a..0011ec9 100644
--- a/module/module_geofence_server.c
+++ b/module/module_geofence_server.c
@@ -257,9 +257,6 @@ EXPORT_API int get_geofences(void *handle, int place_id, int *fence_amount, int
int *fence_id_array = (int *) g_slice_alloc0(sizeof(int) * fence_cnt);
geofence_s *p = (geofence_s *) g_slice_alloc0(sizeof(geofence_s) * fence_cnt);
- if (iter == NULL) {
- MOD_LOGI("Iterator is null");
- }
while (g_variant_iter_next(iter, "a{sv}", &iter_row)) {
while (g_variant_iter_loop(iter_row, "{sv}", &key, &value)) {
if (!g_strcmp0(key, "fence_id")) {
@@ -287,7 +284,8 @@ EXPORT_API int get_geofences(void *handle, int place_id, int *fence_amount, int
index++;
g_variant_iter_free(iter_row);
}
- g_variant_iter_free(iter);
+ if (iter != NULL)
+ g_variant_iter_free(iter);
*params = (geofence_s *) p;
*fence_ids = fence_id_array;