diff options
author | Vladimír Čunát <vcunat@gmail.com> | 2017-02-16 19:16:51 +0100 |
---|---|---|
committer | Vladimír Čunát <vcunat@gmail.com> | 2017-02-16 19:16:51 +0100 |
commit | 524de86db03a0dbecb9c51353cdd70bc0b74a8a5 (patch) | |
tree | a1d3afdecaa54e60e2e7d67e998f71d7e794e5b5 /pkgs/tools/misc/findutils | |
parent | e962a3c95f7d3ee9226d45b9565fb702c5d82cae (diff) | |
download | nixpkgs-524de86db03a0dbecb9c51353cdd70bc0b74a8a5.tar nixpkgs-524de86db03a0dbecb9c51353cdd70bc0b74a8a5.tar.gz nixpkgs-524de86db03a0dbecb9c51353cdd70bc0b74a8a5.tar.bz2 nixpkgs-524de86db03a0dbecb9c51353cdd70bc0b74a8a5.tar.lz nixpkgs-524de86db03a0dbecb9c51353cdd70bc0b74a8a5.tar.xz nixpkgs-524de86db03a0dbecb9c51353cdd70bc0b74a8a5.tar.zst nixpkgs-524de86db03a0dbecb9c51353cdd70bc0b74a8a5.zip |
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.
Diffstat (limited to 'pkgs/tools/misc/findutils')
-rw-r--r-- | pkgs/tools/misc/findutils/default.nix | 4 | ||||
-rw-r--r-- | pkgs/tools/misc/findutils/memory-leak.patch | 21 |
2 files changed, 24 insertions, 1 deletions
diff --git a/pkgs/tools/misc/findutils/default.nix b/pkgs/tools/misc/findutils/default.nix index 1271aa8c986..086c72bdbb2 100644 --- a/pkgs/tools/misc/findutils/default.nix +++ b/pkgs/tools/misc/findutils/default.nix @@ -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; diff --git a/pkgs/tools/misc/findutils/memory-leak.patch b/pkgs/tools/misc/findutils/memory-leak.patch new file mode 100644 index 00000000000..56f65f85622 --- /dev/null +++ b/pkgs/tools/misc/findutils/memory-leak.patch @@ -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; + } + } |