mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 12:17:12 +09:00
coverity: fix coverity error. [1/1]
PD#SWPL-23799 Problem: memory leak. unchecked return value. Solution: free the alloced memory. Verify: build pass. Change-Id: I6d55b582c03bf0f5ac3b871925c8e3f477371137 Signed-off-by: Jianxiong Pan <jianxiong.pan@amlogic.com>
This commit is contained in:
@@ -3105,6 +3105,7 @@ static int gc2145_open(struct file *file)
|
||||
|
||||
if (retval) {
|
||||
vm_deinit_resource(&(dev->vminfo));
|
||||
kfree(fh);
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
||||
@@ -3097,8 +3097,10 @@ static int ov5640_open(struct file *file)
|
||||
}
|
||||
mutex_unlock(&dev->mutex);
|
||||
|
||||
if (retval)
|
||||
if (retval) {
|
||||
kfree(fh);
|
||||
return retval;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_HAS_WAKELOCK
|
||||
wake_lock(&(dev->wake_lock));
|
||||
|
||||
Reference in New Issue
Block a user