Skip to content

Commit

Permalink
staging: intel_sst: Fix memory leak
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andre Bartke authored and Greg Kroah-Hartman committed Jun 28, 2011
1 parent c0777d2 commit 4b2b6d8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/staging/intel_sst/intel_sst_app_interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 4b2b6d8

Please sign in to comment.