From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 93CA6C433FE for ; Thu, 20 Oct 2022 12:21:07 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id ABA1EB986; Thu, 20 Oct 2022 14:20:15 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz ABA1EB986 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1666268465; bh=UbUXk+nkxh53Xfnq/gSDEGr5+VDVokN/qAi+qfB5hDE=; h=Date:From:To:Subject:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=R1H6g2KhsQmavqMwZS2Kcyxz8e+tJNX8O6sOJNJX2Q3Tktb5QivV9d2AqpNdpZjOR WmJVm5HH/6hsg4dGxEEnWdGp9uAF+SihPOuN74eU66dQX+DYMdXf4yQsMCyhViexo3 HmbMPafdfn+/p8Lg3mxdAGk17VVlGookZPJ1UcjQ= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 274EDF8032B; Thu, 20 Oct 2022 14:20:15 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 8370AF804D8; Thu, 20 Oct 2022 14:20:13 +0200 (CEST) Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 46A4FF800B5 for ; Thu, 20 Oct 2022 14:20:10 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 46A4FF800B5 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="eG8K9DEA"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="Y8woB+mU" 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 555DC1FB8B; Thu, 20 Oct 2022 12:20:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1666268410; 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=neGkqgrNDi3nFdQPFtgcfGwfoQjgMggDOVo1IeWFaPk=; b=eG8K9DEAlVtbvsLvKhtQmx+E792yW79D8EY7zmhMxEupGJgosn7nbEs6ryDwHQo2arqNan vk5F6gg2ypUefzpW/wz8BSb3X1Utx8t6ZBAvqp2ZkAZYfAbnfNPI0M7BMpXArHPzlIcMsJ 5IlYW5ZudS16SQ5i5Q7wW9vnMHtaY3w= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1666268410; 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=neGkqgrNDi3nFdQPFtgcfGwfoQjgMggDOVo1IeWFaPk=; b=Y8woB+mUGNvEGzB0qAW40QxaZUgBp0A10jq0jpHtJD9CStCAQ/p6GQucaOdxoQjiPmd4V1 MYKozgocO+bkK2CQ== 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 2D2A713AF5; Thu, 20 Oct 2022 12:20:10 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id b1dbCvo8UWO+HwAAMHmgww (envelope-from ); Thu, 20 Oct 2022 12:20:10 +0000 Date: Thu, 20 Oct 2022 14:20:09 +0200 Message-ID: <8735biadqe.wl-tiwai@suse.de> From: Takashi Iwai To: Yang Yingliang Subject: Re: [PATCH] ALSA: ac97: fix possible memory leak in snd_ac97_dev_register() In-Reply-To: <20221019093025.1179475-1-yangyingliang@huawei.com> References: <20221019093025.1179475-1-yangyingliang@huawei.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 Cc: liam.girdwood@wolfsonmicro.com, alsa-devel@alsa-project.org, nico@cam.org, tiwai@suse.com X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" On Wed, 19 Oct 2022 11:30:25 +0200, Yang Yingliang wrote: > > If device_register() fails in snd_ac97_dev_register(), it should > call put_device() to give up reference, or the name allocated in > dev_set_name() is leaked. > > Fixes: 0ca06a00e206 ("[ALSA] AC97 bus interface for ad-hoc drivers") > Signed-off-by: Yang Yingliang Thanks, applied. Takashi