Commit 32a474b6 authored by Jaroslav Kysela's avatar Jaroslav Kysela

ALSA CVS update - Jaroslav Kysela <perex@suse.cz>

OPL4
Clemens Ladisch <clemens@ladisch.de>
oops - use vfree in error paths, too
parent 6e09e250
...@@ -65,7 +65,7 @@ static long snd_opl4_mem_proc_read(snd_info_entry_t *entry, void *file_private_d ...@@ -65,7 +65,7 @@ static long snd_opl4_mem_proc_read(snd_info_entry_t *entry, void *file_private_d
return -ENOMEM; return -ENOMEM;
snd_opl4_read_memory(opl4, buf, file->f_pos, size); snd_opl4_read_memory(opl4, buf, file->f_pos, size);
if (copy_to_user(_buf, buf, size)) { if (copy_to_user(_buf, buf, size)) {
kfree(buf); vfree(buf);
return -EFAULT; return -EFAULT;
} }
vfree(buf); vfree(buf);
...@@ -90,7 +90,7 @@ static long snd_opl4_mem_proc_write(snd_info_entry_t *entry, void *file_private_ ...@@ -90,7 +90,7 @@ static long snd_opl4_mem_proc_write(snd_info_entry_t *entry, void *file_private_
if (!buf) if (!buf)
return -ENOMEM; return -ENOMEM;
if (copy_from_user(buf, _buf, size)) { if (copy_from_user(buf, _buf, size)) {
kfree(buf); vfree(buf);
return -EFAULT; return -EFAULT;
} }
snd_opl4_write_memory(opl4, buf, file->f_pos, size); snd_opl4_write_memory(opl4, buf, file->f_pos, size);
......
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