[glib: 5/9] g_system_thread_new: Free a memory leak on error path
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 5/9] g_system_thread_new: Free a memory leak on error path
- Date: Mon, 26 Jul 2021 10:06:09 +0000 (UTC)
commit d129395fe2f22f12004526bc11ca7d407f42e4ab
Author: GOUJON Évan <goujon evan gmail com>
Date: Thu Jul 22 16:41:09 2021 +0200
g_system_thread_new: Free a memory leak on error path
glib/gthread-posix.c | 1 +
1 file changed, 1 insertion(+)
---
diff --git a/glib/gthread-posix.c b/glib/gthread-posix.c
index 3d69767e6..8e2e66db5 100644
--- a/glib/gthread-posix.c
+++ b/glib/gthread-posix.c
@@ -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;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]