Commit 4b2b6d84 authored by Andre Bartke's avatar Andre Bartke Committed by Greg Kroah-Hartman

staging: intel_sst: Fix memory leak

In case of an error stream_bufs is not freed here.
Signed-off-by: default avatarAndre Bartke <andre.bartke@gmail.com>
Acked-by: default avatarAlan Cox <alan@linux.intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent c0777d22
...@@ -430,8 +430,10 @@ static int snd_sst_fill_kernel_list(struct stream_info *stream, ...@@ -430,8 +430,10 @@ static int snd_sst_fill_kernel_list(struct stream_info *stream,
return -ENOMEM; return -ENOMEM;
if (copy_from_user((void *) &rar_handle, if (copy_from_user((void *) &rar_handle,
iovec[index].iov_base, iovec[index].iov_base,
sizeof(__u32))) sizeof(__u32))) {
kfree(stream_bufs);
return -EFAULT; return -EFAULT;
}
stream_bufs->addr = (char *)rar_handle; stream_bufs->addr = (char *)rar_handle;
stream_bufs->in_use = false; stream_bufs->in_use = false;
stream_bufs->size = iovec[0].iov_len; stream_bufs->size = iovec[0].iov_len;
......
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