Commit 0b6d092c authored by Kulikov Vasiliy's avatar Kulikov Vasiliy Committed by Takashi Iwai

ALSA: echoaudio: check kmalloc() result

If kmalloc() fails exit with -ENOMEM.
Signed-off-by: default avatarKulikov Vasiliy <segooon@gmail.com>
Ack-by: default avatarGiuliano Pochini <pochini@shiny.it>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 8d011cc7
......@@ -2250,6 +2250,8 @@ static int snd_echo_resume(struct pci_dev *pci)
DE_INIT(("resume start\n"));
pci_restore_state(pci);
commpage_bak = kmalloc(sizeof(struct echoaudio), GFP_KERNEL);
if (commpage_bak == NULL)
return -ENOMEM;
commpage = chip->comm_page;
memcpy(commpage_bak, commpage, sizeof(struct comm_page));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment