diff options
author | Emmanuele Bassi <ebassi@gmail.com> | 2021-06-07 13:23:41 +0000 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gmail.com> | 2021-06-07 13:23:41 +0000 |
commit | bb6aa99e2cf52483157c5bb512061a16a7e6374d (patch) | |
tree | 016a728c45f4905b9cc641569458eb393eeec372 | |
parent | 599910dfea1c32ce4b201e52fbc644d356a63cb3 (diff) | |
parent | d25d6d70f3ad0e2e57857759cd8d4e2236fdcfc2 (diff) |
Merge branch 'backport-2128-inotify-leak-glib-2-68' into 'glib-2-68'
Backport !2128 “inotify: Fix a memory leak” to glib-2-68
See merge request GNOME/glib!2133
-rw-r--r-- | gio/inotify/inotify-path.c | 1 | ||||
-rw-r--r-- | gio/tests/testfilemonitor.c | 8 |
2 files changed, 1 insertions, 8 deletions
diff --git a/gio/inotify/inotify-path.c b/gio/inotify/inotify-path.c index f0528f443..e1129cd72 100644 --- a/gio/inotify/inotify-path.c +++ b/gio/inotify/inotify-path.c @@ -208,6 +208,7 @@ ip_watched_file_free (ip_watched_file_t *file) g_assert (file->subs == NULL); g_free (file->filename); g_free (file->path); + g_free (file); } static void diff --git a/gio/tests/testfilemonitor.c b/gio/tests/testfilemonitor.c index 44c70805b..b74dc2b71 100644 --- a/gio/tests/testfilemonitor.c +++ b/gio/tests/testfilemonitor.c @@ -4,8 +4,6 @@ #include <stdlib.h> #include <gio/gio.h> -#include "glib/glib-private.h" - /* These tests were written for the inotify implementation. * Other implementations may require slight adjustments in * the tests, e.g. the length of timeouts @@ -956,11 +954,6 @@ static void test_file_hard_links (Fixture *fixture, gconstpointer user_data) { -#ifdef _GLIB_ADDRESS_SANITIZER - g_test_incomplete ("FIXME: Leaks an inotify data structure, see glib#2311"); - (void) file_hard_links_output; - (void) file_hard_links_step; -#else GError *error = NULL; TestData data; @@ -1011,7 +1004,6 @@ test_file_hard_links (Fixture *fixture, g_object_unref (data.monitor); g_object_unref (data.file); g_object_unref (data.output_stream); -#endif } int |