Re: [PATCH 4/7] remote.c: add command line option parser for --lockref

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

 



On Tue, Jul 09, 2013 at 12:53:27PM -0700, Junio C Hamano wrote:
> diff --git a/remote.c b/remote.c
> index 81bc876..e9b423a 100644
> --- a/remote.c
> +++ b/remote.c
> @@ -1938,3 +1938,62 @@ struct ref *get_stale_heads(struct refspec *refs, int ref_count, struct ref *fet
>  	string_list_clear(&ref_names, 0);
>  	return stale_refs;
>  }
> +
> +/*
> + * Lockref aka CAS
> + */
> +void clear_cas_option(struct push_cas_option *cas)
> +{
> +	int i;
> +
> +	for (i = 0; i < cas->nr; i++)
> +		free(cas->entry->refname);

Should this be

	free(cas->entry[i]->refname);

?

> +	free(cas->entry);
> +	memset(cas, 0, sizeof(*cas));
> +}
--
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]