grep: recurse in-process using 'struct repository'
[gitweb.git] / commit.c
index 99846d9bf467be8e737341795054588475c65855..cbfd6899392e8715b206c96b3b58cbdaf29c77cd 100644 (file)
--- a/commit.c
+++ b/commit.c
@@ -287,8 +287,7 @@ void free_commit_buffer(struct commit *commit)
 {
        struct commit_buffer *v = buffer_slab_peek(&buffer_slab, commit);
        if (v) {
-               free(v->buffer);
-               v->buffer = NULL;
+               FREE_AND_NULL(v->buffer);
                v->size = 0;
        }
 }