From cf6e3acdb56b846fceb92ccfb2f201c4c6d4ff5f Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Mon, 6 Dec 2004 23:43:43 +0000 Subject: [PATCH] Fix a write to freed memory: Unlock the channel's mutex before unrefing 2004-12-06 Tor Lillqvist * glib/giowin32.c (g_io_win32_finalize): Fix a write to freed memory: Unlock the channel's mutex before unrefing the channel. --- ChangeLog | 5 +++++ ChangeLog.pre-2-10 | 5 +++++ ChangeLog.pre-2-12 | 5 +++++ ChangeLog.pre-2-6 | 5 +++++ ChangeLog.pre-2-8 | 5 +++++ glib/giowin32.c | 2 +- 6 files changed, 26 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 72e7dfdd6..59ab5ae0f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-12-06 Tor Lillqvist + + * glib/giowin32.c (g_io_win32_finalize): Fix a write to freed + memory: Unlock the channel's mutex before unrefing the channel. + 2004-12-06 Matthias Clasen * configure.in: Remove a no longer needed hack for diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 72e7dfdd6..59ab5ae0f 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,8 @@ +2004-12-06 Tor Lillqvist + + * glib/giowin32.c (g_io_win32_finalize): Fix a write to freed + memory: Unlock the channel's mutex before unrefing the channel. + 2004-12-06 Matthias Clasen * configure.in: Remove a no longer needed hack for diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index 72e7dfdd6..59ab5ae0f 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,3 +1,8 @@ +2004-12-06 Tor Lillqvist + + * glib/giowin32.c (g_io_win32_finalize): Fix a write to freed + memory: Unlock the channel's mutex before unrefing the channel. + 2004-12-06 Matthias Clasen * configure.in: Remove a no longer needed hack for diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 72e7dfdd6..59ab5ae0f 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,8 @@ +2004-12-06 Tor Lillqvist + + * glib/giowin32.c (g_io_win32_finalize): Fix a write to freed + memory: Unlock the channel's mutex before unrefing the channel. + 2004-12-06 Matthias Clasen * configure.in: Remove a no longer needed hack for diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 72e7dfdd6..59ab5ae0f 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,8 @@ +2004-12-06 Tor Lillqvist + + * glib/giowin32.c (g_io_win32_finalize): Fix a write to freed + memory: Unlock the channel's mutex before unrefing the channel. + 2004-12-06 Matthias Clasen * configure.in: Remove a no longer needed hack for diff --git a/glib/giowin32.c b/glib/giowin32.c index 9bffc0577..72fe44e65 100644 --- a/glib/giowin32.c +++ b/glib/giowin32.c @@ -737,8 +737,8 @@ g_io_win32_finalize (GSource *source) send (channel->reset_send, send_buffer, sizeof (send_buffer), 0); } - g_io_channel_unref (watch->channel); UNLOCK (channel->mutex); + g_io_channel_unref (watch->channel); } GSourceFuncs g_io_watch_funcs = {