p5551: add a script to test fetch pack-dir rescans
[gitweb.git] / sha1-array.c
index 7d646ab5b8cf80e47c6c1f339affeaa76a41d2d2..838b3bf8478cfdfcd78f866e69dc0f8c5cbf3c9e 100644 (file)
@@ -35,8 +35,7 @@ int oid_array_lookup(struct oid_array *array, const struct object_id *oid)
 
 void oid_array_clear(struct oid_array *array)
 {
-       free(array->oid);
-       array->oid = NULL;
+       FREE_AND_NULL(array->oid);
        array->nr = 0;
        array->alloc = 0;
        array->sorted = 0;