Initialize variable before using 56/196056/2
authorJihoon Kim <jihoon48.kim@samsung.com>
Fri, 21 Dec 2018 05:23:58 +0000 (14:23 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Fri, 21 Dec 2018 05:24:13 +0000 (14:24 +0900)
If rpc_port_autofill_svc_response_group_create() failed, res_group_h has wrong value that already freed.

Change-Id: Ic0a74d7a5b1d6c259149761424908db30e68a9cd
Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
service_lib/autofill_service.c

index 72bd9b6..a18ed44 100644 (file)
@@ -601,6 +601,7 @@ EXPORT_API int autofill_service_send_fill_response(int context_id, autofill_fill
 
     EINA_LIST_FOREACH(h->autofill_fill_response_group_list, l, it)
     {
+        res_group_h = NULL;
         rpc_port_autofill_svc_response_group_create(&res_group_h);
 
         autofill_fill_response_group_foreach_item(it, __fill_response_item_cb, res_group_h);