Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3668712imw; Thu, 7 Jul 2022 05:51:46 -0700 (PDT) X-Google-Smtp-Source: AGRyM1t5bsQeG6ymtdbFu3F2dexy1dXcr3TDRnsIwIy+fCPbv0Wr+hQq//ifYQXOyoLc1FSV/2iW X-Received: by 2002:a17:907:1686:b0:72a:eb72:8ca0 with SMTP id hc6-20020a170907168600b0072aeb728ca0mr12233275ejc.384.1657198306277; Thu, 07 Jul 2022 05:51:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657198306; cv=none; d=google.com; s=arc-20160816; b=fpn0nlWk7HGzTHXzKRHvLJAQMBX7qIQAenPGemMbVYIEXNowlS5bBM13e+wFCycSgJ ozCimHXgjyerpK0hH8fRIJQweE9mUfFxpfI4UattjsID20IA+on7RW/FSQ5HZgZ0VY8L A5VaZVRHjeN+0EQUUWN7WZdGo28MXOGf1k06L+DDOZ7cZ+B8Pvbz2QQSdK0qq1Il9RCg gBMHKTRYb+Q5SRSJSd6cuUpO9Pdyc0tJaYrjPtgd2pyTP20afnv1rEj8PBnfh2DgUzYz vJzZkfcovR8YEdKeXZsr5Hey3/aFoLyJ4qCk638Z+9XUleNuoDhlzJzfyXOaAnE7MBsQ kFQA== 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=nCDPi2i/gdyIG4FKu6XnmxHY5SnDJt4yA7URX6g5UO0=; b=k1/LLFxMoMPCpg1XnCkf0zDwvzFfPqgd4BKa2FPMqHjVqtLtt4CIIdk4325KnhplEa xPG6KlIBXG/NJxni2CQwxbFpvQxTz8WZlwMkGMfaYDaEPP6xfS/ocEQYFusP34PcxOkA VP5L2gpFalmH2OV1cy2vm1dthRAqP4zTW1JXE0osnt3dDDkXTnlXcblLP2GAT+Y2V+UU ain2oUXMEq9px/meEFy1VS3NRK+bC5LOsRKUMeZWrsceUyKVSV1I9YuK2dF1tr7yEb0m ipVYoNW5X0+GLDio9SwyyTYTiQ2/wb3zY1nwIlXAzD396KsZ2eSYAEDdhkj/Dr6vCNbH eCkQ== 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 ey1-20020a0564022a0100b0043a87e6196csi2962453edb.73.2022.07.07.05.51.03; Thu, 07 Jul 2022 05:51:46 -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 S235172AbiGGMoN (ORCPT + 99 others); Thu, 7 Jul 2022 08:44:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41300 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235158AbiGGMoM (ORCPT ); Thu, 7 Jul 2022 08:44:12 -0400 Received: from smtpbg153.qq.com (smtpbg153.qq.com [13.245.218.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9CF271C929 for ; Thu, 7 Jul 2022 05:44:06 -0700 (PDT) X-QQ-mid: bizesmtp82t1657197840tefcpo29 Received: from localhost.localdomain ( [113.57.152.160]) by bizesmtp.qq.com (ESMTP) with id ; Thu, 07 Jul 2022 20:43:52 +0800 (CST) X-QQ-SSF: 01400000002000C0E000B00A0000000 X-QQ-FEAT: +bXiSo2NuBcnT2nofmzHmYOl9JmAe5tdF14H68PcvU6eSCp7PVKwR0rlVOpeY O4oe7q9Tr3qvGxm8l5kTAFETVl28frTaN2MsOG28KxtbqwPjbi4Iv58ZNzXXwjsHCOTXS4a 5PA8Ovlw1thNST7sdXwZwVlzyr+mloAo2Cv20TY63J0bu0COb7CAUA7iMdZEg4XUrmBpMGW npdk8DVY9ZS6dxRnHC8Xib/3ffA/DIxiDGq9d3TgV4L9oABgDsco5ExWXdZvFblnvQOuJkx zI4i0SdEX/kxGXleYSw69oKuXxP+CNYYMv6HlrmWwPUnAZcHw/ka1j5ISpNmy8TMrGnTi5/ 79yjP7QtDdLugmTSpBLSqdXAtse0GuALhh/N//LdY2mK8FfLqX4x5lWcj1m6g== X-QQ-GoodBg: 2 From: Youwan Wang To: linux-bluetooth@vger.kernel.org Cc: Youwan Wang Subject: [PATCH] obexd: fix small probability problem Date: Thu, 7 Jul 2022 20:43:48 +0800 Message-Id: <20220707124348.25184-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, RCVD_IN_MSPIKE_H2,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 Need to consider the case where err is not released --- gobex/gobex.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gobex/gobex.c b/gobex/gobex.c index e9b89cead..bc4d52551 100644 --- a/gobex/gobex.c +++ b/gobex/gobex.c @@ -1140,8 +1140,12 @@ static void handle_response(GObex *obex, GError *err, GObexPacket *rsp) p->rsp_func(obex, err, rsp, p->rsp_data); /* Check if user callback removed the request */ - if (!final_rsp && p != obex->pending_req) + if (!final_rsp && p != obex->pending_req) { + if (p->cancelled) + g_error_free(err); + return; + } } if (p->cancelled) -- 2.20.1