From a88e18c024109c5771843bc88aca1e7962fc0a02 Mon Sep 17 00:00:00 2001 From: "David Kaspar [Dee'Kej]" Date: Tue, 3 May 2016 17:06:41 +0200 Subject: [PATCH] tcsh-6.19.00-027-fix-memory-leak-when-cdpath-fails.patch added > fix memory leak when cdpath fails to find a matching path (David Kaspar) --- ...27-fix-memory-leak-when-cdpath-fails.patch | 25 +++++++++++++++++++ tcsh.spec | 2 ++ 2 files changed, 27 insertions(+) create mode 100644 tcsh-6.19.00-027-fix-memory-leak-when-cdpath-fails.patch diff --git a/tcsh-6.19.00-027-fix-memory-leak-when-cdpath-fails.patch b/tcsh-6.19.00-027-fix-memory-leak-when-cdpath-fails.patch new file mode 100644 index 0000000..424de26 --- /dev/null +++ b/tcsh-6.19.00-027-fix-memory-leak-when-cdpath-fails.patch @@ -0,0 +1,25 @@ +From 554366732a43be40ec8e1394c366c9ae48f37b49 Mon Sep 17 00:00:00 2001 +From: christos +Date: Fri, 8 Apr 2016 16:10:52 +0000 +Subject: [PATCH] fix memory leak when cdpath fails to find a matching path + (David Kaspar) + +--- + sh.dir.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/sh.dir.c b/sh.dir.c +index 6921a32..e583bdc 100644 +--- a/sh.dir.c ++++ b/sh.dir.c +@@ -676,6 +676,7 @@ dfollow(Char *cp, int old) + cleanup_until(cp); + return dgoto(cp); + } ++ xfree(dp); + } + xfree(buf.s); + } +-- +2.5.5 + diff --git a/tcsh.spec b/tcsh.spec index 7bb39fe..1f466c0 100644 --- a/tcsh.spec +++ b/tcsh.spec @@ -55,6 +55,7 @@ Patch023: tcsh-6.19.00-023-fix-debugging-code.patch Patch024: tcsh-6.19.00-024-use-sysmalloc.patch Patch025: tcsh-6.19.00-025-more-generous-ROUNDUP-_LP64.patch Patch026: tcsh-6.19.00-026-quote-backslashes-properly.patch +Patch027: tcsh-6.19.00-027-fix-memory-leak-when-cdpath-fails.patch # Downstream patches -- these should be always included when doing rebase: @@ -202,6 +203,7 @@ fi tcsh-6.19.00-024-use-sysmalloc.patch tcsh-6.19.00-025-more-generous-ROUNDUP-_LP64.patch tcsh-6.19.00-026-quote-backslashes-properly.patch + tcsh-6.19.00-027-fix-memory-leak-when-cdpath-fails.patch * Thu Apr 21 2016 David Kaspar [Dee'Kej] - 6.19.00-6 - Drop tcsh-6.15.00-closem.patch - issue not reproducible, patch not accepted by upstream