Fix memory leak issues 72/206772/2
authorJihoon Kim <jihoon48.kim@samsung.com>
Fri, 24 May 2019 11:24:57 +0000 (20:24 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Fri, 24 May 2019 11:25:08 +0000 (20:25 +0900)
Change-Id: I96b42d7b8f15406c7454bf2d8e35cffca7a7cb54
Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
src/autofill-daemon.c

index 69519ae..f22e99d 100644 (file)
@@ -455,13 +455,13 @@ static int __commit_cb(rpc_port_stub_AutofillAppPort_context_h context, int cont
         return 0;
     }
 
-    rpc_port_stub_AutofillAppPort_context_get_sender(context, &sender);
-
     rpc_port_autofill_svc_save_view_info_h svi = NULL;
     if (rpc_port_autofill_svc_save_view_info_create(&svi) != 0) {
         return 0;
     }
 
+    rpc_port_stub_AutofillAppPort_context_get_sender(context, &sender);
+
     if (sender) {
         rpc_port_autofill_svc_save_view_info_set_app_id(svi, sender);
         LOGD("sender(%s)", sender);
@@ -649,6 +649,8 @@ static void __error_info_recv_cb(void *user_data, int context_id, rpc_port_autof
     if (sender_client)
         rpc_port_AutofillAppPort_autofill_error_info_received_cb_invoke(sender_client->error_info_cb, error_info_h);
 
+    rpc_port_autofill_error_info_destroy(error_info_h);
+
     LOGI("error code : %#x, message : '%s'", error_code, get_error_message(error_code));
 
     if (app_id)