From: Stefan Beller Date: Fri, 27 Mar 2015 22:32:44 GMT Subject: [PATCH V2 1/6] shallow: fix a memleak Message-ID: <1427495569-10863-2-git-send-email-sbeller@google.com> In-Reply-To: <1427495569-10863-1-git-send-email-sbeller@google.com> Signed-off-by: Stefan Beller --- 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