OSDN Git Service
(root)
/
git-core
/
git.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bc8b95a
)
Fix a memory leak
author
李鸿
<leehong@pku.edu.cn>
Sun, 16 Dec 2007 04:53:26 +0000
(12:53 +0800)
committer
Junio C Hamano
<gitster@pobox.com>
Sun, 16 Dec 2007 20:50:08 +0000
(12:50 -0800)
Signed-off-by: Li Hong <leehong@pku.edu.cn>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
dir.c
patch
|
blob
|
history
diff --git
a/dir.c
b/dir.c
index
6b3273d
..
3e345c2
100644
(file)
--- a/
dir.c
+++ b/
dir.c
@@
-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)