Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp1192193rwb; Wed, 26 Jul 2023 08:51:16 -0700 (PDT) X-Google-Smtp-Source: APBJJlGJ3pEgLPrDqrqm5hdobESzBhLTiEIbRdKfIW+JlZT5RYbYHt9Km5jvkutfyCHoQLsA9JPk X-Received: by 2002:a05:6a00:2292:b0:64c:b45f:fc86 with SMTP id f18-20020a056a00229200b0064cb45ffc86mr2637286pfe.17.1690386675932; Wed, 26 Jul 2023 08:51:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690386675; cv=none; d=google.com; s=arc-20160816; b=SGp393GEhKiOy7C+3Rxt1ZTuG72QRv7AsZxgu1fAZzo/+edts4EWZPO2cHFlwhpm1y H0dZxMuUmC+zkxOK7lf9H/x6OgX0fnuS4sUQUwiw+zMPr4yIlSEs3catOWfsHdAKUAa0 iu0e/Qb8hMM6j8i3ViOM+56OFQIUPkXgdU5NhahheqnH5FlzESjYE4C2gpJQ/QAcD7z1 HYkmOuFq9RE0tXpof2l9QK9bWooyR8/1VFSZbeeK4GCbNO3vphWcPT6nm+LTmd8+Yhl/ Q6Y/vSKFty7eOBjpuBX7S/VqWpUjF1XnBdfSJu6nOvKM5gtsAueDKIipQDuXypFRaPyD Vrxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:to:content-language:subject:user-agent:mime-version:date :message-id:dkim-signature; bh=iFI15BErMUMYozQzCLDVmnaZDqYBA9U7yWV7ZJN6KOE=; fh=u69YWOM8vnngabrnuP/7BMK1N3rxF+1OaSmg8mQbHeU=; b=ErqBM3wr3W0oRc97bKP8U7vNmgglKR2g4+c9rddjIASxFbigzo6V60XVk/TPu7EJHw U8DRYz1vctf6XnvwvJsFm6eKyRvyuHpkSkIylgpmNx0ICPSa6LNVjcMaxgv6bUi9KO/a omQsGLBklB342ej3KZUcE1+qTGOsn585m5AM99dMonJIfY3bDaDBRWSy24TmR/d+VjeF SE+i0k6rg/KlXscE/Jv963LwDX+vBdt/3shUQd+PQlbXeIpgza70zzTfjW3f/iDxQfh9 nIep0bHfKPqiGLY9vzZnLsag1mvVRMCldiKnv3hWIwccg6ZpcY9h73QhV5M2nn/D+2Ye Ph8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=GCXdVeOB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 37-20020a631865000000b0055fd1bfb109si13259452pgy.679.2023.07.26.08.51.03; Wed, 26 Jul 2023 08:51:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=GCXdVeOB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231854AbjGZOaC (ORCPT + 99 others); Wed, 26 Jul 2023 10:30:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52888 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231500AbjGZOaA (ORCPT ); Wed, 26 Jul 2023 10:30:00 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CBDF310D1 for ; Wed, 26 Jul 2023 07:29:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1690381749; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=iFI15BErMUMYozQzCLDVmnaZDqYBA9U7yWV7ZJN6KOE=; b=GCXdVeOBrrTbBUHb6VRmybDkjSIRzNGJDoYDX2ptFpdy0l7MsHVkR+3iaWTl7Ctd7CGln9 BgFKfsuELNR/lyuh3upkOHCKUn0VABcAtXN9fbcQzgllhxG8OkzP6MBsKl6N/tqONnNnDN 84RUwrj0TfK7XXvhO8T7twrbZa/TBmQ= Received: from mail-ej1-f70.google.com (mail-ej1-f70.google.com [209.85.218.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-417-oqrkBBSSM3aJoovmC3GEGA-1; Wed, 26 Jul 2023 10:29:07 -0400 X-MC-Unique: oqrkBBSSM3aJoovmC3GEGA-1 Received: by mail-ej1-f70.google.com with SMTP id a640c23a62f3a-992e6840901so118123366b.0 for ; Wed, 26 Jul 2023 07:29:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690381730; x=1690986530; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=iFI15BErMUMYozQzCLDVmnaZDqYBA9U7yWV7ZJN6KOE=; b=NwqWuY05aN1RVW0LJcmLQ66gnGJQ1uylTjG4lGlv+W3kNhrrgjPFWzEdu4EwVbAvEk QV5GdolX25ocFdYpr79WPrUblztubxVWmP2WLZKSROW1wf26GorwB8D3Y0Ttq/pwZIa1 YnDbbR4cGiEgi+wk7zq+k1LSjC+97jgoHdUxjeXJfIl1+dyLuU42rRHVE3GrdcXOphoX 2pYtyVpfYxeYAViXvuuX4wdpUbWteqgiKdbuarTtXHkQKGil//azDNnrJPI3mJuSz8uw UwydDCCszCSjQo12OPLVVWF7MkSReJYt4PFgITBSir5SGFweX9sXlpVD1TbBR+tSYrFl qfSw== X-Gm-Message-State: ABy/qLZsKxmiQcGEYH92spGPBjguYn0inI7Go0sWAXW55go6Rp17qMnj npb374RTGUR6Kmdsqi4cjeztcObyW16L+ya3ho6ArjYACt/lg57jfmmCIXqYg1BBWsOC937aMCx jhT7LAA9hbgoEejyYCM9gPUTF X-Received: by 2002:a17:907:96a2:b0:96f:9cea:a34d with SMTP id hd34-20020a17090796a200b0096f9ceaa34dmr6196764ejc.21.1690381730537; Wed, 26 Jul 2023 07:28:50 -0700 (PDT) X-Received: by 2002:a17:907:96a2:b0:96f:9cea:a34d with SMTP id hd34-20020a17090796a200b0096f9ceaa34dmr6196753ejc.21.1690381730199; Wed, 26 Jul 2023 07:28:50 -0700 (PDT) Received: from ?IPV6:2001:1c00:c32:7800:5bfa:a036:83f0:f9ec? (2001-1c00-0c32-7800-5bfa-a036-83f0-f9ec.cable.dynamic.v6.ziggo.nl. [2001:1c00:c32:7800:5bfa:a036:83f0:f9ec]) by smtp.gmail.com with ESMTPSA id y25-20020a1709064b1900b00992e265495csm9695197eju.212.2023.07.26.07.28.49 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 26 Jul 2023 07:28:49 -0700 (PDT) Message-ID: <79f81c1c-3ec2-dc0f-56ee-2946987be8b3@redhat.com> Date: Wed, 26 Jul 2023 16:28:49 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH 0/5] hp-bioscfg: Address memory leaks and uninitialized variable errors Content-Language: en-US, nl To: Jorge Lopez , platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org, thomas@t-8ch.de, ilpo.jarvinen@linux.intel.com, Dan Carpenter , Christophe JAILLET References: <20230725220056.25560-1-jorge.lopez2@hp.com> From: Hans de Goede In-Reply-To: <20230725220056.25560-1-jorge.lopez2@hp.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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-kernel@vger.kernel.org Hi Jorge, On 7/26/23 00:00, Jorge Lopez wrote: > Submit individual patches to address memory leaks and uninitialized > variable errors for each source file listed below. > > - hp_populate_string_elements_from_package() > drivers/platform/x86/hp/hp-bioscfg/string-attributes.c > > - hp_populate_ordered_list_elements_from_package() > drivers/platform/x86/hp/hp-bioscfg/order-list-attributes.c > > - hp_populate_integer_elements_from_package() > drivers/platform/x86/hp/hp-bioscfg/int-attributes.c > > - hp_populate_enumeration_elements_from_package() > drivers/platform/x86/hp/hp-bioscfg/enum-attributes.c > > - hp_populate_password_elements_from_package() > drivers/platform/x86/hp/hp-bioscfg/passwdobj-attributes.c > > Changes were tested with a HP EliteBook x360 1030 G3 Thank you for the patches fixing this. I'm going to wait a bit with applying these to give other people who have looked at these issues a chance to review these patches (added Dan Carpenter and Christophe JAILLET to the To: list). For future patches please write one patch for each issue you are addressing instead of one patch per file. Since the fixes are the same for all 5 files in this case that would have meant doing 2 patches: 1. To fix the memory leak errors in all 5 files 2. To fix the uninitialized variable in all 5 files. There is no need to send a new version unless changes are requested by one of the reviewers, I'll just squash all these 5 patches into 1 patch when merging this (and keep the uninitialized variable changes as part of the same patch). Also these patches should have something like this as part of the commit msg (directly above your Signed-off-by:) : Reported-by: Dan Carpenter Closes: https://lore.kernel.org/platform-driver-x86/176e14a2-41f8-41b2-854e-77319ec2416d@moroto.mountain/ Regards, Hans > > > Jorge Lopez (5): > hp-bioscfg: Fix memory leaks in string_elements_from_package() > hp-bioscfg: Fix memory leaks in ordered_list_elements_from_package > hp-bioscfg: Fix memory leaks in integer_elements_from_package > hp-bioscfg: Fix memory leaks in enumeration_elements_from_package() > hp-bioscfg: Fix memory leaks in password_elements_from_package() > > drivers/platform/x86/hp/hp-bioscfg/enum-attributes.c | 8 +++++++- > drivers/platform/x86/hp/hp-bioscfg/int-attributes.c | 7 ++++++- > .../platform/x86/hp/hp-bioscfg/order-list-attributes.c | 10 ++++++++-- > .../platform/x86/hp/hp-bioscfg/passwdobj-attributes.c | 10 +++++++++- > drivers/platform/x86/hp/hp-bioscfg/string-attributes.c | 5 ++++- > 5 files changed, 34 insertions(+), 6 deletions(-) >