mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-02 10:43:57 +08:00
staging: intel_sst: Fix memory leak
In case of an error stream_bufs is not freed here. Signed-off-by: Andre Bartke <andre.bartke@gmail.com> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
c0777d2288
commit
4b2b6d842b
@ -430,8 +430,10 @@ static int snd_sst_fill_kernel_list(struct stream_info *stream,
|
||||
return -ENOMEM;
|
||||
if (copy_from_user((void *) &rar_handle,
|
||||
iovec[index].iov_base,
|
||||
sizeof(__u32)))
|
||||
sizeof(__u32))) {
|
||||
kfree(stream_bufs);
|
||||
return -EFAULT;
|
||||
}
|
||||
stream_bufs->addr = (char *)rar_handle;
|
||||
stream_bufs->in_use = false;
|
||||
stream_bufs->size = iovec[0].iov_len;
|
||||
|
Loading…
Reference in New Issue
Block a user