mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-26 15:36:14 +01:00
6d734b895a
_kqsub_free assumes the caller has called _kqsub_cancel before calling it. It checks if both 'deps' and 'fd' have been freed and aborts when the condition is not met. Since the only caller of _kqsub_free is g_kqueue_file_monitor_finalize, which does call _kqsub_cancel before calling _kqsub_free, it seems to be correct for _kqsub_free to assert values of these two members there. However, it is possible for _kqsub_cancel to return early without freeing any resource _kqsub_free expects to be freed. When the kevent call fails, _kqsub_cancel does not free anything and _kqsub_free aborts with assertion failure. This is an unexpected behavior, and it can be fixed by always freeing resources in _kqsub_cancel. Fixes: https://gitlab.gnome.org/GNOME/glib/issues/1935 |
||
---|---|---|
.. | ||
dep-list.c | ||
dep-list.h | ||
gkqueuefilemonitor.c | ||
kqueue-helper.c | ||
kqueue-helper.h | ||
kqueue-missing.c | ||
meson.build |