Merge "icnss: Free regread buffer before allocating new one"

This commit is contained in:
Linux Build Service Account 2017-05-26 00:10:42 -07:00 committed by Gerrit - the friendly Code Review server
commit 22412a0523

View file

@ -3985,6 +3985,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;