mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-18 22:56:22 +00:00
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.
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user