diff options
author | Florian Weimer <fweimer@redhat.com> | 2024-09-21 19:25:35 +0200 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2024-09-21 19:25:35 +0200 |
commit | 455c7622835d16c79e49fe75b8d3a1ae59a3d0ee (patch) | |
tree | 1f107b2f42f8a55b7bb99c244f98e664013e69cc /support | |
parent | e3db0a699c639e97deddcb15939fd9c162801c77 (diff) | |
download | glibc-455c7622835d16c79e49fe75b8d3a1ae59a3d0ee.zip glibc-455c7622835d16c79e49fe75b8d3a1ae59a3d0ee.tar.gz glibc-455c7622835d16c79e49fe75b8d3a1ae59a3d0ee.tar.bz2 |
support: Fix memory leaks in FUSE tests
The internal read buffer (used by all FUSE tests) was not freed.
The support/tst-support_fuse test missed a deallocation.
Diffstat (limited to 'support')
-rw-r--r-- | support/support_fuse.c | 1 | ||||
-rw-r--r-- | support/tst-support_fuse.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/support/support_fuse.c b/support/support_fuse.c index 135dbf1..f6c063b 100644 --- a/support/support_fuse.c +++ b/support/support_fuse.c @@ -659,6 +659,7 @@ support_fuse_unmount (struct support_fuse *f) if (rmdir (f->mountpoint) != 0) FAIL ("FUSE: rmdir (\"%s\"): %m", f->mountpoint); xclose (f->fd); + free (f->buffer_start); free (f->mountpoint); free (f->readdir_buffer); free (f); diff --git a/support/tst-support_fuse.c b/support/tst-support_fuse.c index c4075a6..9ee637c 100644 --- a/support/tst-support_fuse.c +++ b/support/tst-support_fuse.c @@ -331,6 +331,7 @@ do_test (void) { char *subdir_path = xasprintf ("%s/subdir", support_fuse_mountpoint (f)); xmkdir (subdir_path, 01234); + free (subdir_path); } { |