1
0
mirror of https://gitlab.gnome.org/GNOME/glib.git synced 2026-10-24 00:49:00 +03:00

Merge branch 'win32-fsmonitor-rename-leak' into 'main'

Win32 file monitor: 'renamed_file' leaks on every reported rename

See merge request GNOME/glib!5427
This commit is contained in:
Philip Withnall
2026-10-23 11:36:24 +00:00

View File

@@ -39,6 +39,7 @@ g_win32_fs_monitor_handle_event (GWin32FSMonitorPrivate *monitor,
PFILE_NOTIFY_INFORMATION pfni_next;
WIN32_FILE_ATTRIBUTE_DATA attrib_data = {0, };
gchar *renamed_file = NULL;
gboolean interesting = FALSE;
switch (pfni->Action)
{
@@ -105,14 +106,16 @@ g_win32_fs_monitor_handle_event (GWin32FSMonitorPrivate *monitor,
}
if (fme != (GFileMonitorEvent) -1)
return g_file_monitor_source_handle_event (monitor->fms,
fme,
filename,
renamed_file,
NULL,
g_get_monotonic_time ());
else
return FALSE;
interesting = g_file_monitor_source_handle_event (monitor->fms,
fme,
filename,
renamed_file,
NULL,
g_get_monotonic_time ());
g_free (renamed_file);
return interesting;
}