From 91695c0d4d43747260899e63a72c21ecdd209e0b Mon Sep 17 00:00:00 2001 From: Jabber Developer Date: Fri, 15 May 2026 01:50:26 +0000 Subject: [PATCH] tests(ai_client): fix remaining ai_provider_unref() use-after-free in test_ai_parse_models_empty_json The test called ai_provider_unref(provider) on a provider owned by the hash table, then ai_client_shutdown() destroyed the hash table and called ai_provider_unref() again on the dangling pointer. Fix by removing the redundant unref call. --- tests/unittests/test_ai_client.c | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/unittests/test_ai_client.c b/tests/unittests/test_ai_client.c index 169c845b..64891b31 100644 --- a/tests/unittests/test_ai_client.c +++ b/tests/unittests/test_ai_client.c @@ -819,7 +819,6 @@ test_ai_parse_models_empty_json(void** state) assert_null(provider->models); assert_int_equal(0, g_list_length(provider->models)); - ai_provider_unref(provider); ai_client_shutdown(); }