add free about input_result_callback in client module 01/281601/1
authordyamy-lee <dyamy.lee@samsung.com>
Fri, 16 Sep 2022 05:03:09 +0000 (14:03 +0900)
committerTizen AI <ai.tzn.sec@samsung.com>
Tue, 20 Sep 2022 04:53:20 +0000 (13:53 +0900)
when error occured, it needs to free the storage returned from calloc.
So, it add free about input_result_callback

Change-Id: If28aeb37c856ad1c7796c386c598fde44ff83350

src/mmimgr/mmi-client.c

index d94c6ee..fc4dcf8 100644 (file)
@@ -268,6 +268,7 @@ int client_manager_register_input_event(mmi_client *client, int input_event_type
        int ret = rpc_port_stub_mmi_result_cb_clone(result_cb_h, &input_result_callback->result_cb_h);
        if (ret != RPC_PORT_ERROR_NONE) {
                LOGE("Fail to clone mmi_result_cb(%d)", ret);
+               free(input_result_callback);
                return MMI_ERROR_OPERATION_FAILED;
        }