lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <s5hr4oqinkr.wl%tiwai@suse.de>
Date:	Mon, 22 Oct 2012 16:33:08 +0200
From:	Takashi Iwai <tiwai@...e.de>
To:	Denis Kirjanov <kirjanov@...il.com>
Cc:	perex@...ex.cz, alsa-devel@...a-project.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] check for the kzalloc return value

At Mon, 22 Oct 2012 17:05:53 +0400,
Denis Kirjanov wrote:
> 
> 
> Signed-off-by: Denis Kirjanov <kirjanov@...il.com>

Thanks, applied.


Takashi

> ---
>  sound/pci/als300.c |    4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/sound/pci/als300.c b/sound/pci/als300.c
> index 68c4469..e1f74d4 100644
> --- a/sound/pci/als300.c
> +++ b/sound/pci/als300.c
> @@ -394,6 +394,8 @@ static int snd_als300_playback_open(struct snd_pcm_substream *substream)
>  	struct snd_als300_substream_data *data = kzalloc(sizeof(*data),
>  								GFP_KERNEL);
>  
> +	if (!data)
> +		return -ENOMEM;
>  	snd_als300_dbgcallenter();
>  	chip->playback_substream = substream;
>  	runtime->hw = snd_als300_playback_hw;
> @@ -425,6 +427,8 @@ static int snd_als300_capture_open(struct snd_pcm_substream *substream)
>  	struct snd_als300_substream_data *data = kzalloc(sizeof(*data),
>  								GFP_KERNEL);
>  
> +	if (!data)
> +		return -ENOMEM;
>  	snd_als300_dbgcallenter();
>  	chip->capture_substream = substream;
>  	runtime->hw = snd_als300_capture_hw;
> -- 
> 1.7.9.5
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ