Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp3717007iog; Tue, 28 Jun 2022 00:50:50 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tZqmh6PZMQh4gaxkp/ejnOJvsqMdZ+UebKtHwpUDKgtiXlAx5QDzgxEue4HR6Ul/tTd1Nh X-Received: by 2002:a17:907:2081:b0:726:b8d2:fba2 with SMTP id pv1-20020a170907208100b00726b8d2fba2mr5622769ejb.686.1656402649833; Tue, 28 Jun 2022 00:50:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656402649; cv=none; d=google.com; s=arc-20160816; b=rqBGTs1EeZwNkFGJ8kpdH377wuPKKRyKXJewEq17UGSwJkwJBRikr6dTFK5YDV2rGx jmR1bGjkj4M9hFzPSL5YMekhpdEaiIikhUgBeofL3v1XHb3dHFBrtgW6zDrfL+Ib83uG LD7ZmdVilq86PQ98+VnbrMDaoMTuRhrGZadbYHx96zTfxvMg9I4zpHtscTozhonC/oVO OKS6Prn3OTpXeZSGEvupEWfNVZhY/fETJbyb1Jlcyhsi9CibgDc2cgBkIBc1p2UXucAN QMpn1j0prKk8iPw9uV11SI/IxqsmDEeIXZVOXkKr7R2Gb1ZxBFkEBYtL0tgLaZfK92Ob 6pGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:feedback-id:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from; bh=B+oX8FQ30eCa4mTciAi4BBpkvnt164mwaF6NEYst8GI=; b=eDNjJd+rzltUoxuO6DpmAtMMRNv3XTOccLGE/WdD6bbWBkxxWk51dhz82tP0wZooiT 8242/Id7HP3V2GjdDXpLp9RCQVhCyNLK0VknBiVJm8ZBz2rLJyUCkgDah2A7h1Suxjkg HMTgS7oeWB3DqGpU2ctOEtGE0vs0ZNHCG39N8++n1UNy1JK7pVh9Tz3W7yu05aQM52ZN EvS5+AJREuEHPVCVzy7oosqBcl1FT8CRZkKFbS2gWYMcKCdJr96nsOcGmqhL6LOVOT6a 3rL9ZAkWT7IIoNhXWw4rSorT0avNu9pxCjEpcXqtfWtSNCTQFnqCxSYhRV6e/f1N6woo wQsw== ARC-Authentication-Results: i=1; mx.google.com; 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 g19-20020a056402425300b004356e6a0c21si4136194edb.280.2022.06.28.00.50.14; Tue, 28 Jun 2022 00:50:49 -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; 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 S230385AbiF1Hnv (ORCPT + 99 others); Tue, 28 Jun 2022 03:43:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42236 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231248AbiF1Hnr (ORCPT ); Tue, 28 Jun 2022 03:43:47 -0400 Received: from smtpbgjp3.qq.com (smtpbgjp3.qq.com [54.92.39.34]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 383892601 for ; Tue, 28 Jun 2022 00:43:43 -0700 (PDT) X-QQ-mid: bizesmtp77t1656402215tshiqbco Received: from localhost.localdomain ( [113.57.152.160]) by bizesmtp.qq.com (ESMTP) with id ; Tue, 28 Jun 2022 15:43:28 +0800 (CST) X-QQ-SSF: 01400000002000C0E000000A0000000 X-QQ-FEAT: FXvDfBZI5O6MeuR0nlm6sKaBk/Nj2cL396wwFXmdFpKkzHVbRXt61u9z7lpF/ ixFlw/b5k376T4h/BOs/CH7WnryzNyagidRy4rJ9GQgDZmCu939yPqSk44MGXfQEL/zKB7n a5sULvXHbsjBuKDtIHeSnYo1gVKSC7tig6lXS16Im9sqTvJs2x19Crjqah1pva74CpgKOMM 1E8doy18Db9NHpTDI0kfnz7eAV/T6hvqiYAnkcGs1xBOvED37BichhSweXxGQa3TiMkJ5J1 p6Qa/e3+LOGBY/Xo2V926dTONnZGWy+lPvkV1Id9d7zhvz5D1KbdHIajnSkxzw17XaIqXVk PhMh8NUI9sRaujD6wXqyLuBmUxj0w== X-QQ-GoodBg: 1 From: Youwan Wang To: linux-bluetooth@vger.kernel.org Cc: Youwan Wang Subject: [PATCH] obexd: Fix obex pointer is not null judgment Date: Tue, 28 Jun 2022 15:43:25 +0800 Message-Id: <20220628074325.17105-1-wangyouwan@uniontech.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:uniontech.com:qybgforeign:qybgforeign4 X-QQ-Bgrelay: 1 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, SPF_HELO_PASS,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 Judge that the obex pointer is not null before OBEX release --- gobex/gobex-transfer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gobex/gobex-transfer.c b/gobex/gobex-transfer.c index c94d018b2..77cbeefcf 100644 --- a/gobex/gobex-transfer.c +++ b/gobex/gobex-transfer.c @@ -63,8 +63,9 @@ static void transfer_free(struct transfer *transfer) if (transfer->abort_id > 0) g_obex_remove_request_function(transfer->obex, transfer->abort_id); + if (transfer->obex) + g_obex_unref(transfer->obex); - g_obex_unref(transfer->obex); g_free(transfer); } -- 2.20.1