Re: [PATCH 2/3] bundle.c: fix memory leak

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Stefan Beller <sbeller@xxxxxxxxxx> writes:

> The continue statements nearby also have an accompanying free(ref);
>
> Signed-off-by: Stefan Beller <sbeller@xxxxxxxxxx>
> ---

I wonder what happens when dwim_ref() returned 2 or more, though.

>  bundle.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/bundle.c b/bundle.c
> index 2e2dbd5..534783d 100644
> --- a/bundle.c
> +++ b/bundle.c
> @@ -342,6 +342,7 @@ static int write_bundle_refs(int bundle_fd, struct rev_info *revs)
>  		if (e->item->type == OBJ_TAG &&
>  				!is_tag_in_date_range(e->item, revs)) {
>  			e->item->flags |= UNINTERESTING;
> +			free(ref);
>  			continue;
>  		}
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]