OSDN Git Service

branch: reset instead of release a strbuf
[git-core/git.git] / commit-slab.h
index 42d16dc..333d81e 100644 (file)
@@ -82,8 +82,7 @@ static MAYBE_UNUSED void clear_ ##slabname(struct slabname *s)                \
        for (i = 0; i < s->slab_count; i++)                             \
                free(s->slab[i]);                                       \
        s->slab_count = 0;                                              \
-       free(s->slab);                                                  \
-       s->slab = NULL;                                                 \
+       FREE_AND_NULL(s->slab);                                         \
 }                                                                      \
                                                                        \
 static MAYBE_UNUSED elemtype *slabname## _at_peek(struct slabname *s,  \