diff.c: call regfree to free memory allocated by regcomp when necessary
Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
04df568be5
commit
ef5644ea6e
3
diff.c
3
diff.c
@ -912,7 +912,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);
|
||||
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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user