Received: by 2002:a05:7412:a9a8:b0:f9:3269:b82c with SMTP id o40csp345rdh; Mon, 18 Dec 2023 01:22:39 -0800 (PST) X-Google-Smtp-Source: AGHT+IHSdIXzUpmqMC5Uq3wG4O/lhDgULrPBMjq1HghirtAXp0oX1WZMET0tcPyorbUBVfDvfNKs X-Received: by 2002:a17:906:73c3:b0:a22:feea:a69e with SMTP id n3-20020a17090673c300b00a22feeaa69emr3067285ejl.2.1702891358893; Mon, 18 Dec 2023 01:22:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702891358; cv=none; d=google.com; s=arc-20160816; b=DbjjH3jyIjyX07ARS0kG3fpIBRudNlRV9/0fRAotqungGjfLby8qmo/SpfIgcUVi/o jDnrxNTar5UwKHqR4evqJTmZGv3/p1559EiGSJMJr4P4UaGm4G7IHOrJEvtshitAwaRi DCK3jjnhGUHayqEaaPd22cI6guoY8QqOw2L/RTkuh20/OBigtLrCiCyY+49Uku7jmux3 drgDeRzc4ZEGtBbd7TkEhEh/SfSYaQU8BNZKeBUtrAJVFy7FJMMSb1rkl0DYC1HfzyuG Nafenaxwq6M6G09W7ESNzJ+Md/cgg4clOx1rdVSNFxXRn2knTcpCHoJS15Q0pAW1Qpui dGsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:content-transfer-encoding:references:in-reply-to:subject :cc:to:from:date; bh=Iqq5dmkNUorNHD2WYtESTNXh6IIEIg9WZKxRS/IMwts=; fh=cR8nws7MByeaeMF5pZ0EfLUT2p6eW2t17IXIYlnZiOY=; b=wjG/3Hiz63ZgmnVHvSaid7ucuDXqNKP18u5ELHHSl2b1cqK7bKGL/nrWC8J4kQkRJf LQf/ZXgeEvoIzAAiV//XxriYQd5jYtvCDAlw27rzo9sPZg1j1VXKQjSRh2el3zZ8XqCZ UqrKAyEYQtU9vJgIdBGJSYPzWZk1wlGNKBEbQPBu7VvAyQmdPA2cy+/OY4OY6tu+mYOu i9dRe+/6125TzUMzbfB9brxcXvuXUQhbm5Bi2Zoqm1awqn1SyTwmx19I6ig0FUKOs6ac JkVlUdtft/9AniFOJb1+2Ueh6WHl1DTLwKgJQZcQvMuOjkyezNkwwoNX8FSd/WB1D917 dl8w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-3241-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-3241-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id gx12-20020a170906f1cc00b00a235668795asi784703ejb.90.2023.12.18.01.22.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Dec 2023 01:22:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-3241-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-3241-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-3241-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id C10691F230B6 for ; Mon, 18 Dec 2023 09:22:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BE305134A6; Mon, 18 Dec 2023 09:22:03 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org Received: from zju.edu.cn (spam.zju.edu.cn [61.164.42.155]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 385CC134A5 for ; Mon, 18 Dec 2023 09:21:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=zju.edu.cn Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=zju.edu.cn Received: from dinghao.liu$zju.edu.cn ( [10.190.67.94] ) by ajax-webmail-mail-app3 (Coremail) ; Mon, 18 Dec 2023 17:21:51 +0800 (GMT+08:00) Date: Mon, 18 Dec 2023 17:21:51 +0800 (GMT+08:00) X-CM-HeaderCharset: UTF-8 From: dinghao.liu@zju.edu.cn To: "Ira Weiny" Cc: "Dan Williams" , "Vishal Verma" , "Dave Jiang" , nvdimm@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH] [v2] nvdimm-btt: fix several memleaks X-Priority: 3 X-Mailer: Coremail Webmail Server Version 2023.2-cmXT5 build 20230825(e13b6a3b) Copyright (c) 2002-2023 www.mailtech.cn mispb-4df6dc2c-e274-4d1c-b502-72c5c3dfa9ce-zj.edu.cn In-Reply-To: <657c82966e358_2947c22941a@iweiny-mobl.notmuch> References: <20231210085817.30161-1-dinghao.liu@zju.edu.cn> <657b9cb088175_27db80294d2@iweiny-mobl.notmuch> <657c82966e358_2947c22941a@iweiny-mobl.notmuch> Content-Transfer-Encoding: base64 Content-Type: text/plain; charset=UTF-8 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <13ffb3fd.41cd7.18c7c3b52bf.Coremail.dinghao.liu@zju.edu.cn> X-Coremail-Locale: zh_CN X-CM-TRANSID:cC_KCgAHD3MvD4BldlAQAQ--.35919W X-CM-SenderInfo: qrrzjiaqtzq6lmxovvfxof0/1tbiAgoNBmV+xhdFpgAAsq X-Coremail-Antispam: 1Ur529EdanIXcx71UUUUU7IcSsGvfJ3iIAIbVAYjsxI4VWxJw CS07vEb4IE77IF4wCS07vE1I0E4x80FVAKz4kxMIAIbVAFxVCaY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