summaryrefslogtreecommitdiff
path: root/grep.c
diff options
context:
space:
mode:
Diffstat (limited to 'grep.c')
-rw-r--r--grep.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/grep.c b/grep.c
index d03d424..11513ec0 100644
--- a/grep.c
+++ b/grep.c
@@ -1778,8 +1778,7 @@ void grep_source_clear_data(struct grep_source *gs)
case GREP_SOURCE_FILE:
case GREP_SOURCE_SHA1:
case GREP_SOURCE_SUBMODULE:
- free(gs->buf);
- gs->buf = NULL;
+ FREE_AND_NULL(gs->buf);
gs->size = 0;
break;
case GREP_SOURCE_BUF: