Commit 1e09cdd5 authored by Chengguang Xu's avatar Chengguang Xu Committed by Greg Kroah-Hartman

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: default avatarChengguang Xu <cgxu519@gmx.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent dcf9b50e
......@@ -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)
......
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