{"thread":{"id":"11313","subject":"[PATCH] Fix a memory leak","startedAt":"2007-12-16T04:53:26Z","lastAt":"2007-12-16T04:53:26Z","messageCount":1,"participants":["李鸿"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"63300","messageId":"3b74913b3f92.3b3f923b7491@pku.edu.cn","threadId":"11313","inReplyTo":null,"subject":"[PATCH] Fix a memory leak","fromName":"李鸿","fromEmail":"leehong@pku.edu.cn","sentAt":"2007-12-16T04:53:26Z","receivedAt":"2007-12-16T04:53:26Z","isPatch":true,"sender":{"key":"leehong@pku.edu.cn","avatar":null},"body":"\n\nSigned-off-by: Li Hong <leehong@pku.edu.cn>\n---\n dir.c |    3 +++\n 1 files changed, 3 insertions(+), 0 deletions(-)\n\ndiff --git a/dir.c b/dir.c\nindex 6b3273d..3e345c2 100644\n--- a/dir.c\n+++ b/dir.c\n@@ -169,7 +169,10 @@ static int add_excludes_from_file_1(const char *fname,\n \t}\n \tbuf = xmalloc(size+1);\n \tif (read_in_full(fd, buf, size) != size)\n+\t{\n+\t\tfree(buf);\n \t\tgoto err;\n+\t}\n \tclose(fd);\n \n \tif (buf_p)\n-- \n1.5.4.rc0.8.gaba5e\n"}]}