Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/grep.c
diff options
context:
space:
mode:
Diffstat (limited to 'grep.c')
-rw-r--r--grep.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/grep.c b/grep.c
index 11513ec06d..909f35a984 100644
--- a/grep.c
+++ b/grep.c
@@ -1763,12 +1763,9 @@ void grep_source_init(struct grep_source *gs, enum grep_source_type type,
void grep_source_clear(struct grep_source *gs)
{
- free(gs->name);
- gs->name = NULL;
- free(gs->path);
- gs->path = NULL;
- free(gs->identifier);
- gs->identifier = NULL;
+ FREE_AND_NULL(gs->name);
+ FREE_AND_NULL(gs->path);
+ FREE_AND_NULL(gs->identifier);
grep_source_clear_data(gs);
}