From: Stefan Beller <sbeller@google.com>
To: git@vger.kernel.org, gitster@pobox.com
Cc: Stefan Beller <sbeller@google.com>
Subject: [PATCH 2/6] shallow: fix a memleak
Date: Fri, 27 Mar 2015 15:09:04 -0700 [thread overview]
Message-ID: <1427494150-8085-5-git-send-email-sbeller@google.com> (raw)
In-Reply-To: <1427494150-8085-1-git-send-email-sbeller@google.com>
Signed-off-by: Stefan Beller <sbeller@google.com>
---
shallow.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/shallow.c b/shallow.c
index d8bf40a..f8b0458 100644
--- a/shallow.c
+++ b/shallow.c
@@ -416,7 +416,7 @@ static void paint_down(struct paint_info *info, const unsigned char *sha1,
uint32_t *bitmap = paint_alloc(info);
struct commit *c = lookup_commit_reference_gently(sha1, 1);
if (!c)
- return;
+ goto out;
memset(bitmap, 0, bitmap_size);
bitmap[id / 32] |= (1 << (id % 32));
commit_list_insert(c, &head);
@@ -471,7 +471,7 @@ static void paint_down(struct paint_info *info, const unsigned char *sha1,
if (o && o->type == OBJ_COMMIT)
o->flags &= ~SEEN;
}
-
+out:
free(tmp);
}
--
2.3.0.81.gc37f363
next prev parent reply other threads:[~2015-03-27 22:10 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-27 22:09 [PATCH 0/6] Memory leaks once again Stefan Beller
2015-03-27 22:09 ` [PATCH 1/6] pack-bitmap: fix a memleak Stefan Beller
2015-03-27 22:09 ` [PATCH 1/6] shallow: " Stefan Beller
2015-03-27 22:09 ` [PATCH 2/6] line-log.c: " Stefan Beller
2015-03-27 22:09 ` Stefan Beller [this message]
2015-03-27 22:09 ` [PATCH 3/6] " Stefan Beller
2015-03-27 22:09 ` [PATCH 4/6] " Stefan Beller
2015-03-27 22:09 ` [PATCH 4/6] wt-status.c: " Stefan Beller
2015-03-27 22:09 ` [PATCH 5/6] pack-bitmap: " Stefan Beller
2015-03-27 22:09 ` [PATCH 5/6] wt-status.c: " Stefan Beller
2015-03-27 22:09 ` [PATCH 6/6] WIP/RFC/entry.c: " Stefan Beller
2015-03-27 22:12 ` [PATCH 0/6] Memory leaks once again Stefan Beller
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=1427494150-8085-5-git-send-email-sbeller@google.com \
--to=sbeller@google.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/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;
as well as URLs for NNTP newsgroup(s).