summaryrefslogtreecommitdiff
path: root/builtin/unpack-objects.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin/unpack-objects.c')
-rw-r--r--builtin/unpack-objects.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/builtin/unpack-objects.c b/builtin/unpack-objects.c
index 8bc9997767..60bfe48789 100644
--- a/builtin/unpack-objects.c
+++ b/builtin/unpack-objects.c
@@ -112,8 +112,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;