Re: [PATCH] add receive.denyNonFastforwards config variable

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

 



Johannes Schindelin <Johannes.Schindelin@xxxxxx> writes:

> On Wed, 20 Sep 2006, Jeff King wrote:
>
>> Memory leak on 'bases'. It shouldn't matter much because the program is
>> short-lived, but I couldn't remember if we have a policy on such things
>> with increasing lib-ification.
>
> True. How about this:
>
> -- snip --
>
> +		backup = get_merge_bases(old_commit, new_commit, 1);
> +		for (bases = backup;
>  				bases; bases = bases->next)
>  			if (!hashcmp(old_sha1, bases->item->object.sha1))
>  				break;
>  		if (!bases)
>  			return error("denying non-fast forward;"
>  					" you should pull first");
> +		free_commit_list(backup);

Still leaking on the error path ;-).

Will fixup and apply; no need to resend.

-
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]