diff options
author | Johannes Schindelin <johannes.schindelin@gmx.de> | 2017-05-04 15:56:17 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-05-08 05:18:19 +0200 |
commit | 05c2b7ba49e36a6beff30204948dba79451c4233 (patch) | |
tree | 262c1179696ce45ab6dccba36ac770f2fd510027 /builtin | |
parent | mailinfo & mailsplit: check for EOF while parsing (diff) | |
download | git-05c2b7ba49e36a6beff30204948dba79451c4233.tar.xz git-05c2b7ba49e36a6beff30204948dba79451c4233.zip |
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>
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/cat-file.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/builtin/cat-file.c b/builtin/cat-file.c index 1890d7a639..9af863e791 100644 --- a/builtin/cat-file.c +++ b/builtin/cat-file.c @@ -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); write_or_die(1, buf, size); + free(buf); return 0; } |