Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp724339rwb; Thu, 10 Nov 2022 06:42:09 -0800 (PST) X-Google-Smtp-Source: AMsMyM7HjDHxQSvrwCyF2yB/sa+uzg/cjy9hlD5sMESS/JziXm9p0kLDarCU5/1GpkxKmb0pqu0X X-Received: by 2002:a05:6402:1767:b0:461:f1c6:1f22 with SMTP id da7-20020a056402176700b00461f1c61f22mr2490801edb.95.1668091329511; Thu, 10 Nov 2022 06:42:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668091329; cv=none; d=google.com; s=arc-20160816; b=djtmzVzMTSHxQqI9H4f7F3+u+MbP2PFIsq2yIgeLjbttiRQAXEiAu2V7iSqle+/1Ay Jfe7/UL1YjfohN1rAqSGx6HEN5Oq4RaCDLJHBF5ZtyC1bbl2rZwCyX6wJzWi83Y1bcCX cq5BHqBQYqjZlCjTxF8hEQQiahAod7Uc+GiSRFe4z3d282hC41fWML7+yfJG2oKN3Z0O 14ZeG0zsyhjVfUEw5ynJhTk/6rlTwX+gUbPRFA4WIjApqZK1R65YXPnzn1htsGEsZPCd I8hbAzmP4XYJxNaCBw38fNt+ZprrwiPEJIuv5MpBaNZeX7q3Usj+ttMuirmudwjCSxQ1 u7yA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:in-reply-to :subject:cc:to:from:message-id:date:dkim-signature:dkim-signature; bh=XmURArnxcG2DBVBmhfZJ9se8qGoCeEY03n+z1EX2pm0=; b=GED3EVKSoQfsogFaWBG5tkZcRUO6uP5ugHJ8jhcfUNOQ/pa9TnfoZPX9U0R34eyO43 /gWtAoAYgjeZ5HRraHGwF2zMen9EC5di2CDYcJqIlOuOLKKEgP5ITGVB1GuaA9chq1VZ FKdncyBTWlwMqNkCpQaGoK2F1QONmoZj60QAhtygRptFsU+9WY2aFAjjcIv1i/8sm/yt uXX64xASLyy076AWmZU1zbTeX0exJaDvrjYRYxaxKtTjG49MB+QwzG99xOU/wOwrVjWX HSBiOxFpG6Xc+hMRO1AxbexC9XZKHEFuPwAawncgGnhfJGCZSeFfiUyOatxF8wpWiRNH dQeA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=mH71tTaw; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; 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=suse.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cs20-20020a170906dc9400b007811e006b46si3180478ejc.470.2022.11.10.06.41.45; Thu, 10 Nov 2022 06:42:09 -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=@suse.de header.s=susede2_rsa header.b=mH71tTaw; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; 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=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231175AbiKJO3D (ORCPT + 92 others); Thu, 10 Nov 2022 09:29:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55930 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231373AbiKJO2n (ORCPT ); Thu, 10 Nov 2022 09:28:43 -0500 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8F92625EE for ; Thu, 10 Nov 2022 06:28:40 -0800 (PST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 1B6911F9F0; Thu, 10 Nov 2022 14:28:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1668090519; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=XmURArnxcG2DBVBmhfZJ9se8qGoCeEY03n+z1EX2pm0=; b=mH71tTawOS56tumMmlyNBL2KHVe+3HDDriY6K/rAK5O3x8F5qIWKCNdO1WVvFsr32JoNc1 9SLXQFhOcZZzTuGLnSyA9rwPZVuhu4JFkrHAqWxHV7V4jp92jEXRXVz0EQ9jNSG+TmlTbj Mq1PlFzPqHGdlEofKI4OqyTXV1etNHs= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1668090519; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=XmURArnxcG2DBVBmhfZJ9se8qGoCeEY03n+z1EX2pm0=; b=Exn7NPMvKhJRKCgxzoyo+gVzVDSNAemsTS9Q/b2rtUNGmjW5FnpcePAjoGPRBymVPnCQ43 Ah1YsQ3Tvmvh9FCA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 0B7281332F; Thu, 10 Nov 2022 14:28:39 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 88h5ApcKbWP3IwAAMHmgww (envelope-from ); Thu, 10 Nov 2022 14:28:39 +0000 Date: Thu, 10 Nov 2022 15:28:38 +0100 Message-ID: <87bkpeq3xl.wl-tiwai@suse.de> From: Takashi Iwai To: Ye Bin Cc: perex@perex.cz, tiwai@suse.com, alsa-devel@alsa-project.org, yebin10@huawei.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH] ALSA: hda: fix potential memleak in 'add_widget_node' In-Reply-To: <20221110144539.2989354-1-yebin@huaweicloud.com> References: <20221110144539.2989354-1-yebin@huaweicloud.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) Emacs/27.2 Mule/6.0 MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,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, 10 Nov 2022 15:45:39 +0100, Ye Bin wrote: > > From: Ye Bin > > As 'kobject_add' may allocated memory for 'kobject->name' when return error. > And in this function, if call 'kobject_add' failed didn't free kobject. > So call 'kobject_put' to recycling resources. > > Signed-off-by: Ye Bin Thanks, applied now. Takashi