From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 77912 invoked by alias); 19 Feb 2020 13:46:11 -0000 Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org Received: (qmail 77904 invoked by uid 89); 19 Feb 2020 13:46:11 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy=HTo:U*nickc, HX-Spam-Relays-External:209.85.210.68, H*RU:209.85.210.68 X-HELO: mail-ot1-f68.google.com Received: from mail-ot1-f68.google.com (HELO mail-ot1-f68.google.com) (209.85.210.68) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 19 Feb 2020 13:46:10 +0000 Received: by mail-ot1-f68.google.com with SMTP id w6so184594otk.0 for ; Wed, 19 Feb 2020 05:46:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=H6+oW+8MQu/35um1S0c28uBMjX0GoeL56Jj2/sP6nSo=; b=Vqor40JNTwooEBiDQNW+1EigH9/OMehvkNr531JH1iZzQj9IFNjBoUqm6h5/GQtfqL TcGKb+B3W+eYY26tdA/PTb5I7Mb6JT+c0PZS4urh5rh8m20JocpmrA0V9jCzsBD27buk oeMUekKvEMFyKS0SoauXCzrHkPZYUr7EibsKk7a8AiLQFqu3C9I9spHqitNp5ZotxXco RIQb2jcbMoO8dprJGF9VFEsqcAS7/MSeQp8HegS+HU3/5zeEJwfhkf9ILfCJmhpycv/y XJiq6N/KDJTwii3P65M8HsfOfSfAMOsuSLQLIiPaxJkRuktGHiTYhMEhtIVaDdMGX3T+ dvvg== MIME-Version: 1.0 References: <20200218125016.140100-1-hjl.tools@gmail.com> <20200219045924.GN5570@bubble.grove.modra.org> In-Reply-To: From: "H.J. Lu" Date: Wed, 19 Feb 2020 13:46:00 -0000 Message-ID: Subject: Re: [PATCH] plugin: Call dlclose before return in try_load_plugin To: Alan Modra , Nick Clifton Cc: Binutils Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2020-02/txt/msg00465.txt.bz2 On Wed, Feb 19, 2020 at 3:35 AM H.J. Lu wrote: > > On Tue, Feb 18, 2020 at 8:59 PM Alan Modra wrote: > > > > On Tue, Feb 18, 2020 at 04:50:16AM -0800, H.J. Lu wrote: > > > Since plugin can be used only once in try_load_plugin, call dlclose > > > before return. > > > > > > OK for master and 2.34 branch? > > > > > > PR binutils/25355 > > > * plugin.c (plugin_list_entry): Remove handle. > > > (try_load_plugin): Call dlclose before return. > > > > Looks OK to me. > > > > This is the patch I am checking in. It kept > > if (current_plugin) > memset (current_plugin, 0, > offsetof (struct plugin_list_entry, next)); > Hi Nick, Is it OK for backport to 2.34 branch? -- H.J.