Fix the coverity issue (Memory leak)
[platform/core/connectivity/bluetooth-frwk.git] / bt-api / bt-rfcomm-server.c
index c549308..ee38cc0 100644 (file)
@@ -448,6 +448,7 @@ static rfcomm_info_t *__register_method()
        object_id = _bt_register_new_conn(path, new_server_connection);
        if (object_id < 0) {
                __rfcomm_delete_id(id);
+               g_free(path);
                return NULL;
        }
        info = g_new0(rfcomm_info_t, 1);