Re: [PATCH 5/8] builtin/clone: compute checkout metadata for clones

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

 



On 2020-03-15 at 10:39:29, SZEDER Gábor wrote:
> On Tue, Mar 10, 2020 at 06:20:43PM +0000, brian m. carlson wrote:
> > diff --git a/builtin/clone.c b/builtin/clone.c
> > index 1ad26f4d8c..00e5427ef1 100644
> > --- a/builtin/clone.c
> > +++ b/builtin/clone.c
> > @@ -780,11 +780,12 @@ static int checkout(int submodule_progress)
> >  	if (!strcmp(head, "HEAD")) {
> >  		if (advice_detached_head)
> >  			detach_advice(oid_to_hex(&oid));
> > +		free(head);
> > +		head = NULL;
> 
> Coccinelle suggests to use FREE_AND_NULL(head) instead.

I'll do that.
-- 
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204

Attachment: signature.asc
Description: PGP signature


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

  Powered by Linux