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: AS53758 23.128.96.0/24 X-Spam-Status: No, score=-4.0 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,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by dcvr.yhbt.net (Postfix) with ESMTP id C1ECC1F5AE for ; Tue, 11 May 2021 03:29:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230096AbhEKDay (ORCPT ); Mon, 10 May 2021 23:30:54 -0400 Received: from pb-smtp20.pobox.com ([173.228.157.52]:64426 "EHLO pb-smtp20.pobox.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229900AbhEKDax (ORCPT ); Mon, 10 May 2021 23:30:53 -0400 Received: from pb-smtp20.pobox.com (unknown [127.0.0.1]) by pb-smtp20.pobox.com (Postfix) with ESMTP id 35FAE118B93; Mon, 10 May 2021 23:29:48 -0400 (EDT) (envelope-from junio@pobox.com) DKIM-Signature: v=1; a=rsa-sha256; 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=0QzlJxv1STBM Y1mhAHjzM6/HXmTqYj3Bq7zD3QJufFo=; b=C3vgNQ+t0QXxIce7gTeMdh8yAw1U /nu4+/oF52vZeQe4fLgByr+xL7vxL87h9MtI1V6djmuU9V7wqlN1Nq6yEyh7g3NJ WxLW1VFDrsdb3xv+2pj4JSe66ojeu5VtUlt/+ofEaenFiqhAvoWnBACx8Hs7XTfr zSUe7xpuWbUycLA= Received: from pb-smtp20.sea.icgroup.com (unknown [127.0.0.1]) by pb-smtp20.pobox.com (Postfix) with ESMTP id 2D652118B91; Mon, 10 May 2021 23:29:48 -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 5D691118B8D; Mon, 10 May 2021 23:29:45 -0400 (EDT) (envelope-from junio@pobox.com) From: Junio C Hamano To: =?utf-8?B?TMOpbmHDr2M=?= Huard Cc: git@vger.kernel.org, Derrick Stolee , Eric Sunshine , lilinchao@oschina.cn Subject: Re: [PATCH v2 0/1] maintenance: fix two memory leaks References: <20210509221613.474887-1-lenaic@lhuard.fr> <20210510195909.621534-1-lenaic@lhuard.fr> Date: Tue, 11 May 2021 12:29:43 +0900 In-Reply-To: <20210510195909.621534-1-lenaic@lhuard.fr> (=?utf-8?B?Ikw=?= =?utf-8?B?w6luYcOvYw==?= Huard"'s message of "Mon, 10 May 2021 21:59:08 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 X-Pobox-Relay-ID: 21A73EB4-B209-11EB-9E97-E43E2BB96649-77302942!pb-smtp20.pobox.com Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org L=C3=A9na=C3=AFc Huard writes: > Hi! > > Thank you for the code review. > > I=E2=80=99ve moved the `strbuf_release(&line);` closer to the last poin= t where > `line` is used. > > And I=E2=80=99ve included Junio=E2=80=99s patch to address the missing > `free(local_path)` when `hold_lock_file_for_update()<0`. > > L=C3=A9na=C3=AFc Huard (1): > maintenance: fix two memory leaks > > builtin/gc.c | 10 ++++++++-- > 1 file changed, 8 insertions(+), 2 deletions(-) Thanks, will queue.