Re: [PATCH 2/6] Allow more than one keepfile in the transport

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

 



Tomas Carnecky wrote:

> Use an array to keep track of the pack lockfiles.

Should probably use a string_list (which is the same thing :)) to
save some code.

> --- a/transport-helper.c
> +++ b/transport-helper.c
> @@ -362,10 +362,7 @@ static int fetch_with_fetch(struct transport *transport,
>  
>  		if (!prefixcmp(buf.buf, "lock ")) {
>  			const char *name = buf.buf + 5;
> -			if (transport->pack_lockfile)
> -				warning("%s also locked %s", data->name, name);
> -			else
> -				transport->pack_lockfile = xstrdup(name);
> +			transport_keep(transport, name);

Won't buf.buf be released before the lockfile needs to be read?

So I suspect the strdup is necessary.
--
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]