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.
This commit is contained in:
parent
e962a3c95f
commit
524de86db0
@ -8,7 +8,9 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "178nn4dl7wbcw499czikirnkniwnx36argdnqgz4ik9i6zvwkm6y";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ coreutils ];
|
||||
patches = [ ./memory-leak.patch ];
|
||||
|
||||
buildInputs = [ coreutils ]; # bin/updatedb script needs to call sort
|
||||
|
||||
doCheck = !stdenv.isDarwin;
|
||||
|
||||
|
21
pkgs/tools/misc/findutils/memory-leak.patch
Normal file
21
pkgs/tools/misc/findutils/memory-leak.patch
Normal file
@ -0,0 +1,21 @@
|
||||
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;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user