Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp3655944iog; Mon, 27 Jun 2022 23:07:52 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tNe4M53PDGnVUQdsNRpmWqnGSkCr1N8GyhO4iXG15llqVIFBUznfn9OZEo07CtGm0S4ids X-Received: by 2002:a17:90a:a08:b0:1ea:f03c:51f7 with SMTP id o8-20020a17090a0a0800b001eaf03c51f7mr20492518pjo.49.1656396472601; Mon, 27 Jun 2022 23:07:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656396472; cv=none; d=google.com; s=arc-20160816; b=jE+FTq2ulbvwUTHeTMx1AzJ7RlhA2rlWdszpra/Bipd50mPPf6Ff7+hPf/57Gm+U8T MssRlgpx1xoFwAwNHpJm0N5tOkebHuywQM6aSJxHtdb/maOGfxR8oFa3k5a1vrqwLUKn n9ERBheRxC1NkAPhs/gvcZybP/CcjVurMHkU4fc1tgIxaENlPgENBfGJJT7gkWrWAq/H ECi6GVTRow1SVQNfS5n3OKzZgiEi5gDzYdJ4YwnICEESehzREsgaMb3wmC8ccxip/vUJ 5dsK29ypjy54p1LtRTCzcyTkRSeVxySWn3/xp+XirnIXh5BI7lrOI+3B9y0D/WBI6j5+ Hdlg== 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=ozLXjXq/TTrW41D17I6V7tgkG0N0Zm8lTWd/sl4Gb4I=; b=v61oeBwmy2on+7rrJHUHmYrp//HW84ihASWU0upAU0M/dsBCLOWlY8emZDaOFMtlhs 0zmpEv7sb2PEcVfmlXBxco4lItEzFM4NBbxAzikjTD2TJrL2pE3F8cTYusmZEmQ4Cr4q 9hqV450OZRaRDF6R6WspLWpSEoMG4z7gU65U9IbneTG9LCo0EbIbOJD14Gq2X0Vq77K5 G/xV+a7fyQfMRZeDJFVHX+AEwe5fnauBBSFT0/SXcWjFOZ7me7ODrXFY9RNBDTbMcHQz uX5dCx4hpzbc7LJ17l5/g74P9FSLpwR2CZeGWQy1UPWC4NEGmiMrA+Rt7SknDj8X2UcN pkgA== 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 k6-20020a63ba06000000b0040d3be23eabsi15508603pgf.854.2022.06.27.23.07.29; Mon, 27 Jun 2022 23:07:52 -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 S244639AbiF1GBe (ORCPT + 99 others); Tue, 28 Jun 2022 02:01:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40484 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235044AbiF1GBd (ORCPT ); Tue, 28 Jun 2022 02:01:33 -0400 Received: from smtpproxy21.qq.com (smtpbg701.qq.com [203.205.195.86]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 69B6A2C67E for ; Mon, 27 Jun 2022 23:01:32 -0700 (PDT) X-QQ-mid: bizesmtp83t1656396081t4lphc6c Received: from localhost.localdomain ( [113.57.152.160]) by bizesmtp.qq.com (ESMTP) with id ; Tue, 28 Jun 2022 14:01:12 +0800 (CST) X-QQ-SSF: 01400000002000C0E000B00A0000000 X-QQ-FEAT: dpyQmELDBxGupUERX8pQO9/xf/4P/e8Ryc6vLIaZk4fgtdRqbZht1YPNK/Ag6 /LH+JIGS1OXHGjnXEQ0pJgcGJEUSTnDWm1FqhfnG4aFJJO0WR6pBPYSF55iRDDjq9bemB6U kitV9cL+RJml9px74oENEPoYI0U+RiJtWn990zqvofc6StimgDnclAJncTtj60JvCzQgE/3 mR8RPWzjW/VpzknzTJ3kVOdOUPa7wEni2VWyghkD5MLmSuY4AFsu7CAr5W0evm1TW1hLIIx am7F1cViy+2wwiXjwkzMbBXxuQaHG4/r0pMmbXwynjT4Si/aiJemZPOcKg/LlPh1WWD449D R8Y/xuD X-QQ-GoodBg: 2 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 14:01:07 +0800 Message-Id: <20220628060107.26070-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:qybgforeign3 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..626a08e38 100644 --- a/gobex/gobex-transfer.c +++ b/gobex/gobex-transfer.c @@ -64,7 +64,8 @@ static void transfer_free(struct transfer *transfer) g_obex_remove_request_function(transfer->obex, transfer->abort_id); - g_obex_unref(transfer->obex); + if (transfer->obex) + g_obex_unref(transfer->obex); g_free(transfer); } -- 2.20.1