Merge branch 'rs/wt-status-cleanup'
[gitweb.git] / builtin / unpack-objects.c
index 8bc9997767adbb77cc8af81b2b289e22f2b61c5a..689a29fac1a50df6e5b8fc3cda617ef1c6d060b3 100644 (file)
@@ -1,5 +1,6 @@
 #include "builtin.h"
 #include "cache.h"
+#include "config.h"
 #include "object.h"
 #include "delta.h"
 #include "pack.h"
@@ -112,8 +113,7 @@ static void *get_data(unsigned long size)
                        break;
                if (ret != Z_OK) {
                        error("inflate returned %d", ret);
-                       free(buf);
-                       buf = NULL;
+                       FREE_AND_NULL(buf);
                        if (!recover)
                                exit(1);
                        has_errors = 1;