Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3273212pxb; Wed, 13 Oct 2021 02:39:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzgVF+13xowXAL4Olov7vwvA8GNUwhiy9O8C6RZ6n9s7wnDyWjqyFUMarJvJzfFqHAyXDYQ X-Received: by 2002:a17:90b:1645:: with SMTP id il5mr12071038pjb.158.1634117949323; Wed, 13 Oct 2021 02:39:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634117949; cv=none; d=google.com; s=arc-20160816; b=EeQBICeUV+YVTTeZMNAysWSGlsv0hvz7HxlKS+ZBH1zgyah6OcZNrCPvLEnSOYYtNi h5zRo2BfOYJ16jw7PtlhOH1ufYTNZ6uVBxMMtbQ6JY2E0PpXcxocsFFAx9SQG0Fc3DXV f0G3CdJjqChAjEeQXDKNaALPSTmzHH5WSkt3wpdQbDbV7sQ/r/o7/4yvPNgUwE0z8uZs dTI5069fGjHn4tTENh6+BBHSMEo/bBT+lKR0sfo7AjljMG/swJ7+GOczCjMYacKFYhKg CyBXB/oWQLEzMWspTQAZo8U45ekzKyMgR7kA3UuUR5QmB/SMw79FV+w58PqlvlYhsqd3 wggg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=QJ9OOcKk0SAqcC6odR/kUKnKxAUEab3yB+Cct//JQn0=; b=LCNrimMBqpIZboP3zXg+eGzQQ2iV6rXjuxGklZkoEGgX/Twt9FLCVkOkFgi0oYRLyo 2QwkGxZa6U1lyl3v1aR6Z6jVFkLoEt0Rv6m3XH8echxwMIiDCa/MpeOa4bwJXNbo7eo0 F+SE/neEz1k1cQZk4JzL/cbnDgw5GvgOluH0GX2W3Qq9Qr447Q/5uouBZTF21w16ABjP 20+IhxI3DkdQdxubEJvd72n0uLTCcrzgo/HqDrtCCEhhWZT7fs8L3czhikFIj2uG9Xyr PCRI0HIbyaxjZLL4Zyk88aNiCKYpV5/s+dedI5qI39/bCVLIWxlD60lK3FD4T/lEnG2X 2y2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=OpbJdOll; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f126si17171492pfg.59.2021.10.13.02.38.55; Wed, 13 Oct 2021 02:39:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=OpbJdOll; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239115AbhJMJi3 (ORCPT + 99 others); Wed, 13 Oct 2021 05:38:29 -0400 Received: from smtp-relay-internal-0.canonical.com ([185.125.188.122]:56286 "EHLO smtp-relay-internal-0.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239166AbhJMJiX (ORCPT ); Wed, 13 Oct 2021 05:38:23 -0400 Received: from mail-lf1-f69.google.com (mail-lf1-f69.google.com [209.85.167.69]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id 7496A40015 for ; Wed, 13 Oct 2021 09:36:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1634117779; bh=QJ9OOcKk0SAqcC6odR/kUKnKxAUEab3yB+Cct//JQn0=; h=Subject:To:Cc:References:From:Message-ID:Date:MIME-Version: In-Reply-To:Content-Type; b=OpbJdOll+aqtFjEFBIERMn3pW8UWSncCDp2cP7B4eMW1U4AfccEyQ5Qep9i4gByRD mt5FdfLIZjS6+pEmlOyAan5wdPszqLN0STSqj32jPU2dXFxT4gi93SDPHpirmewk51 knaT3+uWgdCcgaSRlmw7y5mPcXai2hQM9kOHn+zSL4vReE4RwVr8i0+YH96PUY5rAj QynpaTF2uxKjadiIhpIrt4xKP2uLrAWgUdYWaekedSneZKq406YxmEXRti+3x4txp3 RmMt0+QQ0PpPfGHMUORRlUet9if2XlOFsgm34Id29sduErkhdQTQKOG2bcdZYvIBm1 NgYkG7652URww== Received: by mail-lf1-f69.google.com with SMTP id o5-20020ac24c45000000b003fd932e4642so1531512lfk.14 for ; Wed, 13 Oct 2021 02:36:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=QJ9OOcKk0SAqcC6odR/kUKnKxAUEab3yB+Cct//JQn0=; b=gv3A65h2MiRU2dACTNB5XdOYZGXu5rkVCqdCSmYV1KUGcVtsg6uGKWNc0X2ajo1l9G 7OcIT8yIgD94wh9vCrNZ+c4mUelvYyekDxjsP5dLq4zMaLvn14M7ObMSObPHg8zaTrdJ Hl+hNbtRT8oVB8EcMuLYaSdmVvFTprcj9Bh/Kwz7F+wFQ1QVfHrhMocpR/Ebu0RaTggR vawbFkY2vuzFvPHpdWXbzrw6TozNgaykd6JIjo5TU8FO+5V5ZHeC5xweswO1+LeA2ree 1aU9rR8KpXsuL4M7VkAR++06Um60RqcxSQEmUHv0TwJcBuVzXPb1hZtbt06g9XF6Rc7O t3ZA== X-Gm-Message-State: AOAM533h/bUvjrFkGBYrKqkvMNbM2snC1a/OD/tjtz9MGbG3nz5rIyOi yagKHbKNgCg5VyyCpcrm9/tEbkRuptBlddsQ3y2LlGk7uDl997PStDHQU4HVfpMg2odNUbOUIot yeP1Dqu38hYCny2yovxe0RWPv01NVa6p10IV3Cz8bcA== X-Received: by 2002:a05:6512:3054:: with SMTP id b20mr40337989lfb.316.1634117778611; Wed, 13 Oct 2021 02:36:18 -0700 (PDT) X-Received: by 2002:a05:6512:3054:: with SMTP id b20mr40337972lfb.316.1634117778427; Wed, 13 Oct 2021 02:36:18 -0700 (PDT) Received: from [192.168.0.22] (89-77-68-124.dynamic.chello.pl. [89.77.68.124]) by smtp.gmail.com with ESMTPSA id t13sm1277182lfc.34.2021.10.13.02.36.17 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 13 Oct 2021 02:36:17 -0700 (PDT) Subject: Re: [PATCH net 2/2] NFC: digital: fix possible memory leak in digital_in_send_sdd_req() To: Ziyang Xuan Cc: davem@davemloft.net, kuba@kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org References: <56fbe3414c94916d197a1a1b3e438eaa129d5c9f.1634111083.git.william.xuanziyang@huawei.com> From: Krzysztof Kozlowski Message-ID: Date: Wed, 13 Oct 2021 11:36:16 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <56fbe3414c94916d197a1a1b3e438eaa129d5c9f.1634111083.git.william.xuanziyang@huawei.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 13/10/2021 09:50, Ziyang Xuan wrote: > 'skb' is allocated in digital_in_send_sdd_req(), but not free when > digital_in_send_cmd() failed, which will cause memory leak. Fix it > by freeing 'skb' if digital_in_send_cmd() return failed. > > Fixes: 2c66daecc409 ("NFC Digital: Add NFC-A technology support") > Signed-off-by: Ziyang Xuan > --- > net/nfc/digital_technology.c | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > Reviewed-by: Krzysztof Kozlowski Best regards, Krzysztof