1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-13 16:15:30 +00:00
nixpkgs/pkgs/tools/misc/findutils/memory-leak.patch
Vladimír Čunát 524de86db0
findutils: plug a memory leak (close #22857)
Using the upstream patch directly.  It's copied in nixpkgs, because:
 - fetchpatch isn't usable at this point in bootstrapping,
 - the upstream patch creates collisions in NEWS.
2017-02-16 19:16:51 +01:00

22 lines
528 B
Diff

http://git.savannah.gnu.org/cgit/findutils.git/patch/?id=c1556892a
diff --git a/find/fstype.c b/find/fstype.c
index 535f920..a0ac8bc 100644
--- a/find/fstype.c
+++ b/find/fstype.c
@@ -75,14 +75,7 @@ free_file_system_list (struct mount_entry *p)
while (p)
{
struct mount_entry *pnext = p->me_next;
-
- free (p->me_devname);
- free (p->me_mountdir);
-
- if (p->me_type_malloced)
- free (p->me_type);
- p->me_next = NULL;
- free (p);
+ free_mount_entry (p);
p = pnext;
}
}