From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 93181 invoked by alias); 25 Feb 2019 13:51:10 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 92924 invoked by uid 89); 25 Feb 2019 13:51:10 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=H*f:sk:49527b8, H*i:sk:49527b8 X-HELO: rock.gnat.com Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 25 Feb 2019 13:51:09 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 480325603C; Mon, 25 Feb 2019 08:51:08 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id GZmqYJYeaWgf; Mon, 25 Feb 2019 08:51:08 -0500 (EST) Received: from murgatroyd (75-166-72-210.hlrn.qwest.net [75.166.72.210]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by rock.gnat.com (Postfix) with ESMTPSA id C45A156039; Mon, 25 Feb 2019 08:51:07 -0500 (EST) From: Tom Tromey To: Pedro Alves Cc: Tom Tromey , gdb-patches@sourceware.org Subject: Re: [RFC] Fix BFD leak in solib-darwin.c References: <20190222163645.9349-1-tromey@adacore.com> <49527b82-328e-e129-21d1-cbc333c70ca7@redhat.com> Date: Mon, 25 Feb 2019 13:51:00 -0000 In-Reply-To: <49527b82-328e-e129-21d1-cbc333c70ca7@redhat.com> (Pedro Alves's message of "Sat, 23 Feb 2019 00:32:01 +0000") Message-ID: <87tvgsx9h0.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2019-02/txt/msg00413.txt.bz2 >>>>> "Pedro" == Pedro Alves writes: Pedro> On 02/22/2019 04:36 PM, Tom Tromey wrote: >> if (sub != NULL) >> dyld_bfd = sub; >> else >> - dyld_bfd.release (); >> + dyld_bfd.reset (nullptr); Pedro> These 4 lines are now equivalent to just doing: Pedro> dyld_bfd = sub; I made this change and I'm going to commit it shortly. Tom