rev-list: check reflog_info before showing usage
[gitweb.git] / attr.c
diff --git a/attr.c b/attr.c
index 6e4b247acd91d30ac5a879183332725d54e756a0..37454999d21e9dcea73e6717da608d80720235e8 100644 (file)
--- a/attr.c
+++ b/attr.c
@@ -639,13 +639,11 @@ void attr_check_reset(struct attr_check *check)
 
 void attr_check_clear(struct attr_check *check)
 {
-       free(check->items);
-       check->items = NULL;
+       FREE_AND_NULL(check->items);
        check->alloc = 0;
        check->nr = 0;
 
-       free(check->all_attrs);
-       check->all_attrs = NULL;
+       FREE_AND_NULL(check->all_attrs);
        check->all_attrs_nr = 0;
 
        drop_attr_stack(&check->stack);