Re: [PATCH] add receive.denyNonFastforwards config variable

From: Junio C Hamano <junkio@cox.net>
Date: 2006-09-21 15:35:13
Johannes Schindelin <Johannes.Schindelin@gmx.de> 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@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Thu Sep 21 15:35:27 2006

This archive was generated by hypermail 2.1.8 : 2006-09-21 15:36:54 EST