diff options
author | Andre Bartke <andre.bartke@googlemail.com> | 2011-05-31 21:03:56 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-06-28 13:27:19 -0700 |
commit | 4b2b6d842ba174a32cc7ad3c4e97aa0cfcaa0be2 (patch) | |
tree | 440332d557f0e9e8bf10003f99675ee5fb51f687 | |
parent | c0777d228892f6a6f87f3439a030d52406f8d637 (diff) | |
download | op-kernel-dev-4b2b6d842ba174a32cc7ad3c4e97aa0cfcaa0be2.zip op-kernel-dev-4b2b6d842ba174a32cc7ad3c4e97aa0cfcaa0be2.tar.gz |
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>
-rw-r--r-- | drivers/staging/intel_sst/intel_sst_app_interface.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/staging/intel_sst/intel_sst_app_interface.c b/drivers/staging/intel_sst/intel_sst_app_interface.c index b8c7ddb..93b41a2 100644 --- a/drivers/staging/intel_sst/intel_sst_app_interface.c +++ b/drivers/staging/intel_sst/intel_sst_app_interface.c @@ -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; |