@matheusbsbs / matheus-bagliano / commits / 6ba78238a8
Fork 0

Fix a memory leak

Signed-off-by: Li Hong <leehong@pku.edu.cn> Signed-off-by: Junio C Hamano <gitster@pobox.com>

李鸿 committed Dec 16, 2007 at 12:53 UTC 6ba78238a824282816944550edc4297dd2808a72
1 file changed +3
dir.c
+3
@@ -169,7 +169,10 @@ static int add_excludes_from_file_1(const char *fname,
169 }
170 buf = xmalloc(size+1);
171 if (read_in_full(fd, buf, size) != size)
172 + {
173 + free(buf);
174 goto err;
175 + }
176 close(fd);
177
178 if (buf_p)