cat-file: fix memory leak
Discovered by Coverity. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>maint
parent
f0733c13ed
commit
05c2b7ba49
|
|
@ -165,6 +165,7 @@ static int cat_one_file(int opt, const char *exp_type, const char *obj_name,
|
||||||
die("git cat-file %s: bad file", obj_name);
|
die("git cat-file %s: bad file", obj_name);
|
||||||
|
|
||||||
write_or_die(1, buf, size);
|
write_or_die(1, buf, size);
|
||||||
|
free(buf);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue