From: 李鸿 <leehong@pku.edu.cn>
To: git@vger.kernel.org
Subject: [PATCH] Fix a memory leak
Date: Sun, 16 Dec 2007 12:53:26 +0800 [thread overview]
Message-ID: <3b74913b3f92.3b3f923b7491@pku.edu.cn> (raw)
Signed-off-by: Li Hong <leehong@pku.edu.cn>
---
dir.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/dir.c b/dir.c
index 6b3273d..3e345c2 100644
--- 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)
--
1.5.4.rc0.8.gaba5e
reply other threads:[~2007-12-16 5:00 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3b74913b3f92.3b3f923b7491@pku.edu.cn \
--to=leehong@pku.edu.cn \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox