Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1392888rwb; Fri, 18 Nov 2022 18:11:00 -0800 (PST) X-Google-Smtp-Source: AA0mqf7YQhxHZA16LH781PVHS6c/wwUpS7iK/otkrpl7N+gnwjCCDmYGd7qwWQHQqmr5Yb6zek0H X-Received: by 2002:a17:907:c24a:b0:7ac:2e16:bc31 with SMTP id tj10-20020a170907c24a00b007ac2e16bc31mr8016080ejc.242.1668823860581; Fri, 18 Nov 2022 18:11:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668823860; cv=none; d=google.com; s=arc-20160816; b=ZyJxIoVjz8nOy6fQHHK2BM+vxbx5d1JExcsjFFPNUb+OQDoC1hK88NXUIlRYMQV9Wb M6zoFjupWDpkj7oKks9ibIz/e+7O3N47izs0ucziixVwrbiOeL0aogF1eSDVv+MhGkft jX43zv2V3vnM9N6NwguggcEH8ocK5pSWGMFgRWd7L5SqVmKbdK4okgWd4LsiTcqHu8hv YSJOFQuj9NDbzxmxTmSQhJjf5lq2nzA4NIjgyvcW97mWnUd0J8et6Ccw6plxCr2772zf WWwmfipV71zzXp3Kyj6j6L/Va57WzDQhBQhODdJqQzh89fNjtpJysh89Sn4QDWm5BQGq 0XTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=XvWzYDYvzBF0mXR3AV+hvHFCrovZRy6GEpfXlrHki3o=; b=Y+cWVKqgz6pA5LoeQ6qq76cVfcxUCC+Q/L+bYkCFxgjxIVYn9Y9oe/Px1InosvHj0m gUUafKdc27mo8yB8sdhd0xxZW8T3lcpYq+05+N+S6f51jbSeKGrIIsgt1AwHnhne/SSJ RKXQ7eaWBl95u9cG06PkD4Jd9ia1pwg0w6q4L8jZ0z7xlyYiby+TRYwdZMAZJn5fcLc0 35oh1ByLVZ5j/EA8RoGTI3pFzGz7+YFA4AkVcM8YJRHMvUK7BMujzTq756HBEFwt+MpF D6SzwsbbxTtzN7rwbIyy6MI0uE9K4zBX8FkBSbmjOX6GUL9vP5cQNwedIQ57KGgGWLum fz8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rhjeifAB; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dz13-20020a0564021d4d00b00467238595easi4682271edb.369.2022.11.18.18.10.39; Fri, 18 Nov 2022 18:11:00 -0800 (PST) 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=@kernel.org header.s=k20201202 header.b=rhjeifAB; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231936AbiKSByj (ORCPT + 90 others); Fri, 18 Nov 2022 20:54:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52756 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234451AbiKSBxU (ORCPT ); Fri, 18 Nov 2022 20:53:20 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 57678220EC for ; Fri, 18 Nov 2022 17:41:10 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 0C2AAB82664 for ; Sat, 19 Nov 2022 01:41:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 24F16C433D6; Sat, 19 Nov 2022 01:41:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1668822067; bh=dlCBK5dMhB9d3GVIA0pD0qYoZC713KGHTS5GXLvDeYo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=rhjeifABc81j2OrJCTC/gsMXDs+zsk2IXWjZzumuNXNRJPxjbLSBgHvaGdJdoBbKt Q4/tRoyWxcWLDdME9XxrsIvgr1Y9sYljzHcmKhRAR3/oMsWYMjjXdx6IgwntVLt/oi r31eY1NUoQAfJUKwATfKMTrvEOnH/5eyPp5pAUi+duOCVfVYVMrg4OzbE3POCc6MQQ I/p30klitx5m0pQM/8kTtfRAZlwM9IJBlueCQJGTsR5VgEfLUNsGNkWBbzTT/k2Z7h Ny8fYlbr2ZQbQWUZsLGmypo7igU3jiG7v5nv6XQjXqIlTM9bNA01Oz9uSRLCbniVZj 5mYWYLLa7EC/w== Date: Sat, 19 Nov 2022 09:41:01 +0800 From: Shawn Guo To: Marco Felsch Cc: Zheng Yongjun , s.hauer@pengutronix.de, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, festevam@gmail.com, linux-imx@nxp.com, kernel@pengutronix.de Subject: Re: [PATCH] ARM: mxs: fix memory leak in mxs_machine_init() Message-ID: <20221119014100.GA16229@T480> References: <20221117062011.84602-1-zhengyongjun3@huawei.com> <20221117091315.wwojwl7vhp43k63v@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221117091315.wwojwl7vhp43k63v@pengutronix.de> User-Agent: Mutt/1.9.4 (2018-02-28) X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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-kernel@vger.kernel.org On Thu, Nov 17, 2022 at 10:13:15AM +0100, Marco Felsch wrote: > On 22-11-17, Zheng Yongjun wrote: > > If of_property_read_string() failed, 'soc_dev_attr' should be > > freed before return. Otherwise there is a memory leak. > > > > Fixes: 2046338dcbc6 ("ARM: mxs: Use soc bus infrastructure") > > Signed-off-by: Zheng Yongjun > > Reviewed-by: Marco Felsch Applied, thanks!