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

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

Merge "msm: camera: sensor: Free vc_cfg pointer in case of error"

parents 797ad3aa dd51787e
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved.
/* Copyright (c) 2011-2015, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -655,8 +655,12 @@ static int32_t msm_csid_cmd32(struct csid_device *csid_dev, void __user *arg)
				(void *)compat_ptr(lut_par32.vc_cfg[i]),
				sizeof(vc_cfg32))) {
				pr_err("%s: %d failed\n", __func__, __LINE__);
				for (; i >= 0; i--)
				for (i--; i >= 0; i--) {
					kfree(csid_params.lut_params.vc_cfg[i]);
					csid_params.lut_params.vc_cfg[i] = NULL;
				}
				kfree(vc_cfg);
				vc_cfg = NULL;
				rc = -EFAULT;
				break;
			}