Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
coccinelle: make use of the "type" FREE_AND_NULL() rule
[gitweb.git]
/
builtin
/
unpack-objects.c
diff --git
a/builtin/unpack-objects.c
b/builtin/unpack-objects.c
index 8bc9997767adbb77cc8af81b2b289e22f2b61c5a..60bfe487893f9ac6c2523242f20ad3d335e3a7fd 100644
(file)
--- 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;