Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 35009236 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "Revert "[media] v4l2: Fix the possible memory leak in v4l2 framework""

parents 439f7bcd be89df3e
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -2331,7 +2331,6 @@ video_usercopy(struct file *file, unsigned int cmd, unsigned long arg,
	size_t  array_size = 0;
	void __user *user_ptr = NULL;
	void	**kernel_ptr = NULL;
	bool	heap_allocate = false;

	/*  Copy arguments into temp kernel buffer  */
	if (_IOC_DIR(cmd) != _IOC_NONE) {
@@ -2343,7 +2342,6 @@ video_usercopy(struct file *file, unsigned int cmd, unsigned long arg,
			if (NULL == mbuf)
				return -ENOMEM;
			parg = mbuf;
			heap_allocate = true;
		}

		err = -EFAULT;
@@ -2425,8 +2423,6 @@ out_array_args:

out:
	kfree(mbuf);
	if (heap_allocate)
		kfree(parg);
	return err;
}
EXPORT_SYMBOL(video_usercopy);