Not consequential in the sense that I doubt it would ever cause run-time
trouble.  However, plugging it does eliminate distracting warnings from
tools like valgrind, and that matters.

>From cebcd3ece053c51bbbf1f47669c771eced828b61 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyer...@redhat.com>
Date: Mon, 8 Mar 2010 18:38:40 +0100
Subject: [PATCH] grep: plug an inconsequential leak

* src/grep.c (main): Plug a leak: free "keys".
---
 src/grep.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/grep.c b/src/grep.c
index 27a1516..680d8de 100644
--- a/src/grep.c
+++ b/src/grep.c
@@ -2267,6 +2267,7 @@ There is NO WARRANTY, to the extent permitted by law.\n"),
 #endif /* MBS_SUPPORT */

   compile(keys, keycc);
+  free (keys);

   if ((argc - optind > 1 && !no_filenames) || with_filenames)
     out_file = 1;
--
1.7.0.2.393.gfb6b


Reply via email to