Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp169285iog; Fri, 24 Jun 2022 01:26:34 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uBrg7FBuw52kOqdy2MysLzKVY8ZMecrT4LlvAR/UT0XIi+9+L1ERj0esRtS1pC2kIqStJ7 X-Received: by 2002:a05:6a00:1908:b0:525:5dad:cb1c with SMTP id y8-20020a056a00190800b005255dadcb1cmr6334659pfi.47.1656059194235; Fri, 24 Jun 2022 01:26:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656059194; cv=none; d=google.com; s=arc-20160816; b=X3Ah7rnUdJKhaZ1bmBh6Rc5Fvg27YdGlYyQovIzV1HAwD5PSgsWYLSxhpzPKnHYTIo h9mGIB1azamNv21S9sC+HqCAaeyYefbp5LOkSsfHJIVfUrlYDhLx69tVBldtBPAjy287 6BanzfrvATh9ul9fshdEstogY7QHZ45JU739UkqfBCjRoIpgr/kOslR6e/RcFYAkrlBg 0TeL1y0X0BEq8CUPugfLyPO2X+lNnoMxosffYE5lj5QhllSn32zB96yzR2YT7ixjJ2yj 18wC+NG5Gz7FStAS+g1Wle0HZPqUrYjJWlPv/t7Apr7ddzyUt0+/xZQRpvOkHHMDZKfM cqRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=TVNe5mvGwxoMiAI3zD/zrxle7aFiZ4zMW7xpowqfrJE=; b=y1NtI5pQZso2K2MFgJFke/sGJNig2oOhV62KT59MBLC9MqEv4P8TbjMD/guFXUMReU Q7tywt7xUAMSYc71XvDdPp/uAsmhh2AYISz8qDWSCoE6om6+8Ic6BDZU9jx/pmXiPI7U qZMOPfBC2V5rf0NEHI89m0y01dxk9kbQcADRnlu9lJIA3vSpN6veSiW48s2j294rt8CC VgySG92qOuH86JLU4SwWyODJ5e6lyU2QbMB8ZmykcYgWVewVy7TWrfD+DEsJlMavTH0Y ocwgrmx/yLO4mqKuMRbunuiLnnPhQkpHWlPqD+82EHshxpOEQen8s35qXAr+d10ybphd XzZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codecoup-pl.20210112.gappssmtp.com header.s=20210112 header.b=KHOPkeGs; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d9-20020a636809000000b0040cf878fc67si1877172pgc.717.2022.06.24.01.26.06; Fri, 24 Jun 2022 01:26:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@codecoup-pl.20210112.gappssmtp.com header.s=20210112 header.b=KHOPkeGs; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229584AbiFXIZx (ORCPT + 99 others); Fri, 24 Jun 2022 04:25:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47066 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229523AbiFXIZw (ORCPT ); Fri, 24 Jun 2022 04:25:52 -0400 Received: from mail-qv1-xf33.google.com (mail-qv1-xf33.google.com [IPv6:2607:f8b0:4864:20::f33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B5B767668F for ; Fri, 24 Jun 2022 01:25:51 -0700 (PDT) Received: by mail-qv1-xf33.google.com with SMTP id 59so3615438qvb.3 for ; Fri, 24 Jun 2022 01:25:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=codecoup-pl.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=TVNe5mvGwxoMiAI3zD/zrxle7aFiZ4zMW7xpowqfrJE=; b=KHOPkeGs9ngHWMGWAg2q/sbX4/hGAOBw1G0VEwdGlQ2sKi745B04NZyBw8d1aHU+WB e4Yh6y6obob2VCJ4XNIVMHmIwk2DKF9eehT1DngVBLUPgqssbOQLLsh5IRGO1LSwngHd 75YD1TpqlR0B6m+ugcse4tf4cjHyg3LoKmnPJ+92tuTZ9QayHoxyOrWtrwk9BIOgKqm8 7rQgB/FuSon8zCehyZW7pbcUubgg31rvcAePIN1mUutXZ3eKuP5xiO6wSNz9ymayBVT0 aNEd/8GlUWw7B6Sm5uGta0/j+fmuawnWZiJ6RZKHXog7xzL/bAALlm6TGjKu7SFQzbnD x3bg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=TVNe5mvGwxoMiAI3zD/zrxle7aFiZ4zMW7xpowqfrJE=; b=IYadPRSBB+DCF7YRrlzsdjfPeFBwCYWqpeJVtMNfCaj3LzadZJ8N7QlpYvkdliuMIL 5p6DNuXrzHTJBmud3w7CfPVjuGCl1ZWP54puPZfQm8ysoy+liTH+OBOUN/EEcnk+s6Na edMxivEzHCCuV0j8kccjKuQVFO3E75OGFg6Z/7hCfEa0eB16acd7osNtvYXtd+MQktfk U0r9iU/lAS/miIn5WlPe2OE0FQHP7GObgX98DKZHrqN4G31IeEAVwIUXtUdz2iYdKcLh 5/O8bdx7w7sAkHkrJDqbZyhvk8eH8d3FuUPYWpV7XRWvAF2IqFcPZS4hvcr0OkLgcUHy j9zA== X-Gm-Message-State: AJIora9Ad5Awg3MMscB40A7O+V0Z7iXhRhjIIenUKIuQtyR09+/3bUDI Q3W+4iCcetVyWD0Z4rJ/lEX88AWKVApfEg== X-Received: by 2002:ac8:4e53:0:b0:305:2d86:8bce with SMTP id e19-20020ac84e53000000b003052d868bcemr11789311qtw.639.1656059150409; Fri, 24 Jun 2022 01:25:50 -0700 (PDT) Received: from ix.. ([95.143.243.62]) by smtp.gmail.com with ESMTPSA id i10-20020a05620a404a00b006a6d4261f40sm1437897qko.111.2022.06.24.01.25.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Jun 2022 01:25:49 -0700 (PDT) From: Szymon Janc To: linux-bluetooth@vger.kernel.org Cc: Szymon Janc Subject: [PATCH] monitor: Fix crash when using RTT backend Date: Fri, 24 Jun 2022 10:25:41 +0200 Message-Id: <20220624082541.51687-1-szymon.janc@codecoup.pl> X-Mailer: git-send-email 2.36.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org This fix regression introduced by "monitor: Fix memory leaks". J-Link shared library is in use if jlink_init() returns 0 and thus handle shall not be closed. --- monitor/jlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/monitor/jlink.c b/monitor/jlink.c index f1d8ce660..f9d4037f4 100644 --- a/monitor/jlink.c +++ b/monitor/jlink.c @@ -112,7 +112,7 @@ int jlink_init(void) return -EIO; } - dlclose(so); + /* don't dlclose(so) here cause symbols from it are in use now */ return 0; } -- 2.36.1