From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-4.1 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by dcvr.yhbt.net (Postfix) with ESMTP id B091F1F619 for ; Sun, 15 Mar 2020 19:30:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728797AbgCOTay (ORCPT ); Sun, 15 Mar 2020 15:30:54 -0400 Received: from pb-smtp20.pobox.com ([173.228.157.52]:56197 "EHLO pb-smtp20.pobox.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727495AbgCOTay (ORCPT ); Sun, 15 Mar 2020 15:30:54 -0400 Received: from pb-smtp20.pobox.com (unknown [127.0.0.1]) by pb-smtp20.pobox.com (Postfix) with ESMTP id 3FC6BC4882; Sun, 15 Mar 2020 15:30:52 -0400 (EDT) (envelope-from junio@pobox.com) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type:content-transfer-encoding; s=sasl; bh=K86q8Pi+oIhD wg3bLVNsWUPmpBs=; b=SvNJDs82ZoKf8ps2si3FFmkDpjesXmb294xr3t0ER1Ex 93UXaswBL48U1TR7kckZsF7yesUFiOVPzUANcK5p7N8VD766gunOt1o5paQba9qI 1QluAdvT4H2kkv76/p5wTJ5AIoanSbjoUp5PWhjVW8nyrMyJIPdreqJW2NapEiU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type:content-transfer-encoding; q=dns; s=sasl; b=U+qhrh SMDhqUDL6L6FgCR2wtrCRP0lUiglcYZjgal+yobP/h2N1jy1hVByei5ZoHrLFwEB uVYezTXrexznjee+hVwv829f/3a5Y+5Qi3NrppbJRuQTLJaSyFLqHl0GrR1dXY1y YvSkcthZrNGXd/I6GAXRsT9c9FVjMokRdVeEM= Received: from pb-smtp20.sea.icgroup.com (unknown [127.0.0.1]) by pb-smtp20.pobox.com (Postfix) with ESMTP id 375BFC4881; Sun, 15 Mar 2020 15:30:52 -0400 (EDT) (envelope-from junio@pobox.com) Received: from pobox.com (unknown [34.74.119.39]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp20.pobox.com (Postfix) with ESMTPSA id 7EEEAC487E; Sun, 15 Mar 2020 15:30:49 -0400 (EDT) (envelope-from junio@pobox.com) From: Junio C Hamano To: SZEDER =?utf-8?Q?G=C3=A1bor?= Cc: "brian m. carlson" , git@vger.kernel.org, Taylor Blau Subject: Re: [PATCH 5/8] builtin/clone: compute checkout metadata for clones References: <20200310182046.748959-1-sandals@crustytoothpaste.net> <20200310182046.748959-6-sandals@crustytoothpaste.net> <20200315103929.GH3122@szeder.dev> Date: Sun, 15 Mar 2020 12:30:47 -0700 In-Reply-To: <20200315103929.GH3122@szeder.dev> ("SZEDER =?utf-8?Q?G=C3=A1?= =?utf-8?Q?bor=22's?= message of "Sun, 15 Mar 2020 11:39:29 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 X-Pobox-Relay-ID: 79D58FEE-66F3-11EA-AE1A-B0405B776F7B-77302942!pb-smtp20.pobox.com Content-Transfer-Encoding: quoted-printable Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org SZEDER G=C3=A1bor writes: > 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 =3D NULL; > > Coccinelle suggests to use FREE_AND_NULL(head) instead. Thanks; squashed to update 'pu'.