Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp72466ybj; Fri, 8 May 2020 06:49:12 -0700 (PDT) X-Google-Smtp-Source: APiQypLJRkkxofu9ihjU/bgGqLxMJgJjidS/j1iYqPH0Juti9m7JZLhDhbZUKjNIh8VXn2CjcDge X-Received: by 2002:adf:afdb:: with SMTP id y27mr2935980wrd.323.1588945752192; Fri, 08 May 2020 06:49:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588945752; cv=none; d=google.com; s=arc-20160816; b=Ww8+FJkqGxjyxOSEAyTzmfh5lMzyCD9WKUB8Nscuza1ytLuBCJ8m1rMI2cEXE5ACTE 8mBL5Kdg8Q9u6BKjJhGdc7uVKRlCl+sPoLrTBSJPUN0LW2xP99DgRzWL1Tv3++kiX8aP wAeUQ2MdBoJ+ZKcC1c88wELaLV6R2jvHYYy2VKyM5PM26DtlsachIiVm5XQBoxbMQxEU X194xuxxevSg3GDf+nkYnfMN9vcefYP4723Yhuvxo9wZsKYez2LaIf33AY84UlSKyxC+ HSF8Gj6GkNZbTFY2RBV0cTkPXZ2QYWoXKVq/itrWkzzGb6TKNcL8kTDVmLz/O+0ndGgz CJ6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:autocrypt:from:references:cc:to:subject:dkim-signature; bh=Q0BjtIXFcKXs7MGKGmRp1BJNVZaJ88c2uryixC1pL2s=; b=OopahVMtYbvmtMd7QqEPyNSAngbH/X8LgRAsBWVSm07T4KluliP07A6SFGcAaL57fO jwPGyMugjUwhLAJtjVXw2PtmcUMU5bgNOEfqkBUvywzyZ8edGG/SqOXKMMcIsf1UF8J9 VWKJJ9p73J8bp0sJUNQFJ+7ndezLkLHS5DeofrpttEEOStn8yu4UCcVlOgJpvTGCeDE8 nYan/qh3m/jqm0LDm5ybfULHZCWR/mJTLogu/+VFIhyKleJEnt9Gl+ZBFpLpV9dqQuFu UINBC4w2MMDUo4HE9eiki8cHe+wC1XxcSzAXuKgbOoakcoeWazAIc4QmCSo5i48l2pL7 t8ag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@web.de header.s=dbaedf251592 header.b=NWZXNzF+; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g15si1609529wrb.19.2020.05.08.06.48.48; Fri, 08 May 2020 06:49:12 -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=@web.de header.s=dbaedf251592 header.b=NWZXNzF+; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728025AbgEHNoV (ORCPT + 99 others); Fri, 8 May 2020 09:44:21 -0400 Received: from mout.web.de ([217.72.192.78]:35613 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727088AbgEHNoU (ORCPT ); Fri, 8 May 2020 09:44:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=dbaedf251592; t=1588945366; bh=C15PgIF+OxV54kuqRqyq5JSrb0uSs+zSmVL7r4LIDTs=; h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To; b=NWZXNzF++Lx/ecEIg1snHItoDkhlg9MnwwLAul3n+iLEpjmxd/SkblNNrMg+l2fWV MDrrPk/RSm5/R2IBFtBnXZpBln85C/ad5TtlCP5jdvdGHbo52NLKDRqdWegfAx60VY CUm/n1f8BiTfs+x5WXcu2x11zcg+xaWu68eEV4j0= X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9 Received: from [192.168.1.2] ([93.132.146.138]) by smtp.web.de (mrweb101 [213.165.67.124]) with ESMTPSA (Nemesis) id 0LmLoU-1iyXjg1eWg-00ZwUv; Fri, 08 May 2020 15:42:46 +0200 Subject: Re: [PATCH v4] tools/bootconfig: fix resource leak in apply_xbc() To: Yunfeng Ye , Steven Rostedt , Masami Hiramatsu Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Shiyuan Hu , Hewenliang , Dan Carpenter References: From: Markus Elfring Autocrypt: addr=Markus.Elfring@web.de; prefer-encrypt=mutual; keydata= mQINBFg2+xABEADBJW2hoUoFXVFWTeKbqqif8VjszdMkriilx90WB5c0ddWQX14h6w5bT/A8 +v43YoGpDNyhgA0w9CEhuwfZrE91GocMtjLO67TAc2i2nxMc/FJRDI0OemO4VJ9RwID6ltwt mpVJgXGKkNJ1ey+QOXouzlErVvE2fRh+KXXN1Q7fSmTJlAW9XJYHS3BDHb0uRpymRSX3O+E2 lA87C7R8qAigPDZi6Z7UmwIA83ZMKXQ5stA0lhPyYgQcM7fh7V4ZYhnR0I5/qkUoxKpqaYLp YHBczVP+Zx/zHOM0KQphOMbU7X3c1pmMruoe6ti9uZzqZSLsF+NKXFEPBS665tQr66HJvZvY GMDlntZFAZ6xQvCC1r3MGoxEC1tuEa24vPCC9RZ9wk2sY5Csbva0WwYv3WKRZZBv8eIhGMxs rcpeGShRFyZ/0BYO53wZAPV1pEhGLLxd8eLN/nEWjJE0ejakPC1H/mt5F+yQBJAzz9JzbToU 5jKLu0SugNI18MspJut8AiA1M44CIWrNHXvWsQ+nnBKHDHHYZu7MoXlOmB32ndsfPthR3GSv jN7YD4Ad724H8fhRijmC1+RpuSce7w2JLj5cYj4MlccmNb8YUxsE8brY2WkXQYS8Ivse39MX BE66MQN0r5DQ6oqgoJ4gHIVBUv/ZwgcmUNS5gQkNCFA0dWXznQARAQABtCZNYXJrdXMgRWx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JhbzN+r9djSGGN/5IBDfUqSANC8cWzHpWaHmSuU3JSAMB/N+yQjIad2ztTckZY pwT6oxng29LzZspTYUEzMz3wK2jQHw+U66qBFk8whA7B2uAU1QdGyPgahLYSOa4XAEGb6wbI FEE= Message-ID: <757dc0e5-3ab7-b00b-11dc-e94a903e3901@web.de> Date: Fri, 8 May 2020 15:42:40 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:1b1WNI1dffWfQMoEdQKqVkDKp7Ltfkj0aF0vAGC1xNkKHNjP/Us rX7uG8418Wk/mfz4q+p4WOxJMlBJ+HK2Qzdj+kH4YiwlkQepgg/0k56T2iBaoVv4gM5qafd ozr17VRHn7bMXKtPwPSzu+inFuT8sFSBqYMrGR/2bU3bEnaqydcN8zonUGeg64VUgAzNzRs VsrO26kGFq+n432iCwoJw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:F4zd9lxVFG0=:wvgKq/f8G6GbjVDrH4PML6 iPncoyU0HsjcwaGZNAr2ReQBZJlzXsUxezO1lUp9wAhb+n6PFDWmFOl1kN9+vAarY/F5X1cVk eA6lonQgE506htGNmY0ZnJV/VaenjMQnrqsnS2OUizkKHwxYCClj1LFrVwDdvIn45AxlHVi9b U5gB4K+0vxDs0036WTX5UHF9MKb515KjuKTGTpmAETfpGGsi/oPYb6/Fp3WrP9UxJwbJJ+bpv 3IvjjZe7XG9DV05gWQid+E2sdpMo9hYbjFKEV1e9GgBTOjkkDQrUayX2ODG1cao3wktBJMxrR 4FdDWIqNJfRNDltIigWgRhBB5TcSlItMMOhlrhzp5D85njhJD9+2xOaqpgRIXEDOWPXv61SW4 Mpc9guuk/SX5yAkVfJWsQdpHqU1W/kD/eWEbpCzhOFRxZ44ewJAR9XJ3RXtXh7UUN0OlQCZYD L7ppo22HcVmRf09iPNE9TAE+dyRT8LrgnuvU0HXsN9Jv5S2sN6FNDwHwmltbR6vYsC9jSv3Oy HiE/zOqff9ywCiws9+4vxiBg2XVTo/QJQCYMI6KKm97dzVIoLyt2PB89jUeTkwnRv2dqQwHfQ Ku9N4cSOz1UT7xU2Lh4RC5Y3AS0VjSHn0+EMeHrn72FTg0j9SK70CIXKVPBGZPfkjqILSCfTi wSgV+LXRSy5/8b/zQ6DTUE2eE0QAHFBneizAN4JVtQRAxA+WW7EdPfuJ0bqO1N2sS6n4lMrFG oL3P2Ng3f3rNokQ+O774Wrny3qYghH03LxJSGVdo2EKOYgCxxsMoH4amlnZ01+RzkHZyou3GZ TH6up6HTfeX/JCfmAa0HdM9w8w7z9+wLT4Mc6xNrg8gpbssbM7FEunQtkzxB4slDaRSplDidK NFX7NC+GuoX0TYwrcoOMoALT2/4VaAFL3Xwvq3qqq7GMzKoTS3K7p73Xo4t/E4gI73P9G59eM GQy0kgPL3tPm+hILrqeMPRpy+XhPg7+/Rxq3u+j9ELsDOhb/jgzs52T2vQ/cPxo5MXXiAQqxd XakW09ymdK/QZ9WAOhjDTmpQkJ7UWeAwDa2OCUXEt2znYpl0xZmdxJawnZ4G/gW6gbmH9nQg1 pLJI0EvuUzFt3C4ZBaprdJCZgExDakFu4MH7uwVpWhXTMGi75uiIre/zLLAYpq0rif3W20uLs 5TpcqUUwF59aZYgUJx/y5mIVVsv+RMDIWUwB7pdKaniDLvfCNhLcWVT0Tv4tconYdfegTUxcr rtvTeQYE21bnkfhD4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > An error is found by a internel analysis tool: > "Memory leak: data" and "Resource leak: fd" in tools/bootconfig/main.c If such an information will ever be integrated into a final commit message= , I would prefer a wording variant like the following. Two issues were pointed out by an internal source code analysis tool: * Line =E2=80=A6: Memory leak: data * Line =E2=80=A6: Resource leak: fd Each of these issues has got a different importance for this function impl= ementation. > Fix the @data and @fd allocations that are leaked in the error path of > apply_xbc(). How do you think about to replace the @ characters by other delimiters for the relevant identifiers? Regards, Markus