increase code quality(static analysis)
[platform/core/account/fido-client.git] / test / Dummy_ASM_DBUS / dummy_asm_server.c
index 0b24aef..97039a6 100755 (executable)
@@ -181,12 +181,14 @@ _dbus_on_asm_request(Dummyasm *object, GDBusMethodInvocation *invocation, const
        if (strcmp(caller_path, _FIDO_SERVICE_PATH) != 0) {
                _ERR("Only fido-service is allowed to call ASM");
                dummyasm_complete_asm_request(object, invocation, -1, NULL);
+               free(caller_path);
                return true;
        }
 
        char *req_type = __get_request_type(uaf_request_json);
        if (req_type == NULL) {
-                dummyasm_complete_asm_request(object, invocation, -1, NULL);
+               dummyasm_complete_asm_request(object, invocation, -1, NULL);
+               free(caller_path);
                return true;
        }
 
@@ -204,6 +206,7 @@ _dbus_on_asm_request(Dummyasm *object, GDBusMethodInvocation *invocation, const
                dummyasm_complete_asm_request(object, invocation, 0, _GET_REGISTRATIONS_RESPONSE);
 
        free(req_type);
+       free(caller_path);
        return true;
 }