diff options
author | Junio C Hamano <gitster@pobox.com> | 2010-09-09 17:29:40 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-09-09 17:29:40 -0700 |
commit | 8ac8cf5bc17ef11a9c5d51ab128ad010cb37c464 (patch) | |
tree | 7412604a665890a9ce4dbeaac0cca3406f2ba7ca /diff.c | |
parent | bff42061214e17f342efc909c73f29bf66df51e9 (diff) | |
parent | 1b6ecbad3511b1aaa65172ef8b520dd3b5141614 (diff) | |
download | git-8ac8cf5bc17ef11a9c5d51ab128ad010cb37c464.tar.gz |
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; } |