diff options
author | Junio C Hamano <gitster@pobox.com> | 2010-09-10 02:29:40 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-09-10 02:29:40 +0200 |
commit | 8ac8cf5bc17ef11a9c5d51ab128ad010cb37c464 (patch) | |
tree | 7412604a665890a9ce4dbeaac0cca3406f2ba7ca /diff.c | |
parent | t/t4018: test whether the word_regex patterns compile (diff) | |
parent | xdiff-interface.c: always trim trailing space from xfuncname matches (diff) | |
download | git-8ac8cf5bc17ef11a9c5d51ab128ad010cb37c464.tar.xz git-8ac8cf5bc17ef11a9c5d51ab128ad010cb37c464.zip |
Merge branch 'maint'
* maint:
xdiff-interface.c: always trim trailing space from xfuncname matches
diff.c: call regfree to free memory allocated by regcomp when necessary
Diffstat (limited to 'diff.c')
-rw-r--r-- | diff.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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; } |