[glib/wip/win32monitor: 4/4] gwin32fsmonitorutils: avoid a possible invalid memory access
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/wip/win32monitor: 4/4] gwin32fsmonitorutils: avoid a possible invalid memory access
- Date: Tue, 1 Mar 2016 07:47:28 +0000 (UTC)
commit 5145a14be455d6f20ac65427fe94950397897a8f
Author: Ignacio Casal Quinteiro <icq gnome org>
Date: Tue Mar 1 08:46:05 2016 +0100
gwin32fsmonitorutils: avoid a possible invalid memory access
gio/win32/gwin32fsmonitorutils.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/gio/win32/gwin32fsmonitorutils.c b/gio/win32/gwin32fsmonitorutils.c
index 982acb0..6198277 100644
--- a/gio/win32/gwin32fsmonitorutils.c
+++ b/gio/win32/gwin32fsmonitorutils.c
@@ -111,8 +111,8 @@ g_win32_fs_monitor_handle_event (GWin32FSMonitorPrivate *monitor,
renamed_file,
NULL,
g_get_monotonic_time ());
- else
- return FALSE;
+
+ return FALSE;
}
@@ -382,6 +382,10 @@ g_win32_fs_monitor_create (gboolean isfile)
void
g_win32_fs_monitor_finalize (GWin32FSMonitorPrivate *monitor)
{
+ g_free (monitor->wfullpath_with_long_prefix);
+ g_free (monitor->wfilename_long);
+ g_free (monitor->wfilename_short);
+
if (monitor->hDirectory == INVALID_HANDLE_VALUE)
{
/* If we don't have a directory handle we can free
@@ -404,10 +408,6 @@ g_win32_fs_monitor_finalize (GWin32FSMonitorPrivate *monitor)
*/
monitor->self = NULL;
}
-
- g_free (monitor->wfullpath_with_long_prefix);
- g_free (monitor->wfilename_long);
- g_free (monitor->wfilename_short);
}
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]