From 01b695dd7074239fa3b1ab3209bdb253666f165c Mon Sep 17 00:00:00 2001 From: Jabber Developer Date: Fri, 15 May 2026 01:57:35 +0000 Subject: [PATCH] tests(ai_client): remove remaining ai_provider_unref() before ai_client_shutdown() Fix three more tests that called ai_provider_unref() on providers owned by the hash table, causing use-after-free when ai_client_shutdown() destroyed the hash table. Tests fixed: - test_ai_parse_models_null_handling - test_ai_parse_models_escaped_quotes - test_ai_parse_models_with_whitespace --- tests/unittests/test_ai_client.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/tests/unittests/test_ai_client.c b/tests/unittests/test_ai_client.c index 64891b31..4a40b0d4 100644 --- a/tests/unittests/test_ai_client.c +++ b/tests/unittests/test_ai_client.c @@ -834,7 +834,6 @@ test_ai_parse_models_null_handling(void** state) ai_parse_models_from_json(provider, NULL); assert_null(provider->models); - ai_provider_unref(provider); ai_client_shutdown(); } @@ -858,7 +857,6 @@ test_ai_parse_models_escaped_quotes(void** state) GList* models = provider->models; assert_non_null(models); - ai_provider_unref(provider); ai_client_shutdown(); } @@ -882,7 +880,6 @@ test_ai_parse_models_with_whitespace(void** state) GList* models = provider->models; assert_string_equal("model-with-spaces", models->data); - ai_provider_unref(provider); ai_client_shutdown(); }