diff options
author | 李鸿 <leehong@pku.edu.cn> | 2007-12-16 12:53:26 +0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2007-12-16 12:50:08 -0800 |
commit | 6ba78238a824282816944550edc4297dd2808a72 (patch) | |
tree | 5ba9e78fb4dc58d378b4e12ff3be061fe057e033 /dir.c | |
parent | bc8b95ae4a4b21753e84bbfd28cbcbf1b3f6e0a8 (diff) | |
download | git-6ba78238a824282816944550edc4297dd2808a72.tar.gz git-6ba78238a824282816944550edc4297dd2808a72.tar.xz |
Fix a memory leak
Signed-off-by: Li Hong <leehong@pku.edu.cn>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'dir.c')
-rw-r--r-- | dir.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -169,7 +169,10 @@ static int add_excludes_from_file_1(const char *fname, } buf = xmalloc(size+1); if (read_in_full(fd, buf, size) != size) + { + free(buf); goto err; + } close(fd); if (buf_p) |