changeset 17868:33325a4c16a9

test-strstr.c: avoid a trivial leak * tests/test-strstr.c (main): Free haystack.
author Jim Meyering <meyering@fb.com>
date Sun, 11 Jan 2015 16:47:11 -0800
parents 8e17fb096145
children 74d3193af09c
files ChangeLog tests/test-strstr.c
diffstat 2 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2015-01-11  Jim Meyering  <meyering@fb.com>
 
+	test-strstr.c: avoid a trivial leak
+	* tests/test-strstr.c (main): Free haystack.
+
 	update-copyright: recognize groff's \(co marker
 	* build-aux/update-copyright (circle_c_re): Also accept
 	uses of \(co, as found in gzip.1.
--- a/tests/test-strstr.c
+++ b/tests/test-strstr.c
@@ -272,6 +272,7 @@
         ASSERT (p);
         ASSERT (p - haystack == i);
       }
+    free (haystack);
   }
 
   return 0;