g_system_thread_new: Free a memory leak on error path

This commit is contained in:
GOUJON Évan 2021-07-22 16:41:09 +02:00
parent bd779c96e9
commit d129395fe2

View File

@ -1331,6 +1331,7 @@ g_system_thread_new (GThreadFunc proxy,
{
g_set_error (error, G_THREAD_ERROR, G_THREAD_ERROR_AGAIN,
"Error creating thread: %s", g_strerror (ret));
g_free (thread->thread.name);
g_slice_free (GThreadPosix, thread);
return NULL;
}