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

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

Merge "icnss: Free regread buffer before allocating new one" into msm-4.9

parents cb00eb76 5347b0c7
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -3969,6 +3969,9 @@ static ssize_t icnss_regread_write(struct file *fp, const char __user *user_buf,
	    data_len > QMI_WLFW_MAX_DATA_SIZE_V01)
		return -EINVAL;

	kfree(priv->diag_reg_read_buf);
	priv->diag_reg_read_buf = NULL;

	reg_buf = kzalloc(data_len, GFP_KERNEL);
	if (!reg_buf)
		return -ENOMEM;