git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/4] diff.c: call regfree to free memory allocated by regcomp when necessary
@ 2010-09-09 19:02 Brandon Casey
  2010-09-09 19:02 ` [PATCH 2/4] xdiff-interface.c: always trim trailing space from xfuncname matches Brandon Casey
                   ` (3 more replies)
  0 siblings, 4 replies; 16+ messages in thread
From: Brandon Casey @ 2010-09-09 19:02 UTC (permalink / raw)
  To: git; +Cc: peff, Brandon Casey

From: Brandon Casey <drafnel@gmail.com>


Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
---
 diff.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/diff.c b/diff.c
index 144f2aa..9a5c77c 100644
--- a/diff.c
+++ b/diff.c
@@ -919,7 +919,10 @@ static void free_diff_words_data(struct emit_callback *ecbdata)
 		free (ecbdata->diff_words->minus.orig);
 		free (ecbdata->diff_words->plus.text.ptr);
 		free (ecbdata->diff_words->plus.orig);
-		free(ecbdata->diff_words->word_regex);
+		if (ecbdata->diff_words->word_regex) {
+			regfree(ecbdata->diff_words->word_regex);
+			free(ecbdata->diff_words->word_regex);
+		}
 		free(ecbdata->diff_words);
 		ecbdata->diff_words = NULL;
 	}
-- 
1.7.2.1

^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2010-09-10 17:26 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-09 19:02 [PATCH 1/4] diff.c: call regfree to free memory allocated by regcomp when necessary Brandon Casey
2010-09-09 19:02 ` [PATCH 2/4] xdiff-interface.c: always trim trailing space from xfuncname matches Brandon Casey
2010-09-09 19:21   ` Jeff King
2010-09-09 19:33     ` Brandon Casey
2010-09-09 19:35       ` Jeff King
2010-09-09 19:02 ` [PATCH 3/4] t/t4018: test whether the word_regex patterns compile Brandon Casey
2010-09-09 19:23   ` Jeff King
2010-09-09 19:39     ` Brandon Casey
2010-09-09 19:59       ` Jeff King
2010-09-10 16:13         ` [PATCH] t/t4018: avoid two unnecessary sub-shell invocations Brandon Casey
2010-09-10 17:25           ` Ævar Arnfjörð Bjarmason
2010-09-09 19:02 ` [PATCH 4/4] userdiff.c: add builtin fortran regex patterns Brandon Casey
2010-09-09 19:25   ` Jeff King
2010-09-09 19:41     ` Brandon Casey
2010-09-10 16:18       ` [PATCH 4/4 v2] " Brandon Casey
2010-09-09 19:15 ` [PATCH 1/4] diff.c: call regfree to free memory allocated by regcomp when necessary Jeff King

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).