summaryrefslogtreecommitdiffstats
path: root/drivers/uio
diff options
context:
space:
mode:
authorChengguang Xu <cgxu519@gmx.com>2019-01-17 17:27:46 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-01-22 12:03:16 +0100
commit1e09cdd506c8833a9d52cb61009798660cff4051 (patch)
tree9faa8077885b084848ba2bc6fd982c9668fbdff2 /drivers/uio
parentdcf9b50e2197133a0137b8194bae23e6eba70c14 (diff)
downloadlinux-1e09cdd506c8833a9d52cb61009798660cff4051.tar.gz
linux-1e09cdd506c8833a9d52cb61009798660cff4051.tar.bz2
linux-1e09cdd506c8833a9d52cb61009798660cff4051.zip
uio: fix potential memory leak in error case
Should jump to lable err_infoopen when idev->info is NULL in uio_open(). Signed-off-by: Chengguang Xu <cgxu519@gmx.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/uio')
-rw-r--r--drivers/uio/uio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/uio/uio.c b/drivers/uio/uio.c
index 131342280b46..46e5c1c31ebe 100644
--- a/drivers/uio/uio.c
+++ b/drivers/uio/uio.c
@@ -491,7 +491,7 @@ static int uio_open(struct inode *inode, struct file *filep)
if (!idev->info) {
mutex_unlock(&idev->info_lock);
ret = -EINVAL;
- goto err_alloc_listener;
+ goto err_infoopen;
}
if (idev->info && idev->info->open)