]> Savannah Git Hosting - gnulib.git/commitdiff
test-strstr.c: avoid a trivial leak
authorJim Meyering <meyering@fb.com>
Mon, 12 Jan 2015 00:47:11 +0000 (16:47 -0800)
committerJim Meyering <meyering@fb.com>
Mon, 12 Jan 2015 00:47:11 +0000 (16:47 -0800)
* tests/test-strstr.c (main): Free haystack.

ChangeLog
tests/test-strstr.c

index 821d1cbb4361870d2026f3a8f0b7d0d5164d835c..adaae8ab3ee688df3fed4898d8d3ac2cf3220cfb 100644 (file)
--- 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.
index c801fa4fda2b7cca14073791afb26b92ff503097..70ebf50c8ae89adf1ef90d9db24863a75fa6c9d4 100644 (file)
@@ -272,6 +272,7 @@ main (int argc, char *argv[])
         ASSERT (p);
         ASSERT (p - haystack == i);
       }
+    free (haystack);
   }
 
   return 0;