Fix memory leak issue 72/201572/2
authorJihoon Kim <jihoon48.kim@samsung.com>
Mon, 18 Mar 2019 01:25:58 +0000 (10:25 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Mon, 18 Mar 2019 01:38:31 +0000 (10:38 +0900)
Dynamic memory referenced by 'handle->auth_info_cb' was allocated at autofill_stub.c:3925 by calling function 'rpc_port_AutofillAppPort_autofill_auth_info_received_cb_clone' at autofill-daemon.c:98 and lost at autofill-daemon.c:121.

Change-Id: Ie3bbba42a1dab3688c3d409b6f3374a35335d9f7
Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
src/autofill-daemon.c

index 7466701214e892cd9cf24cb86845a2c59cbd4ae4..34b78a5e7f30bae1fddb5d9944f5bad7b8636582 100644 (file)
@@ -117,6 +117,8 @@ static autofill_client_s *__create_client(const char *app_id, int context_id,
     if (!handle->error_info_cb) {
         LOGE("Out of memory");
         free(handle->app_id);
+        rpc_port_AutofillAppPort_autofill_auth_info_received_cb_destroy(handle->auth_info_cb);
+        rpc_port_AutofillAppPort_autofill_fill_response_received_cb_destroy(handle->fill_response_received_cb);
         free(handle);
         return NULL;
     }