From: Chengguang Xu Date: Thu, 17 Jan 2019 09:27:46 +0000 (+0800) Subject: uio: fix potential memory leak in error case X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=1e09cdd506c8833a9d52cb61009798660cff4051;p=openwrt%2Fstaging%2Fblogic.git 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 Signed-off-by: Greg Kroah-Hartman --- 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)