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

Commit bef62721 authored by Baochu Xu's avatar Baochu Xu Committed by Gerrit - the friendly Code Review server
Browse files

msm: camera: Fix memory leak in camera driver



There is memory leak in function msm_camera_qup_i2c_write.
This change is to fix it.

Change-Id: I263ffbad5495892dd232d3f9b0fb12b59015bfab
Signed-off-by: default avatarBaochu Xu <bxu@codeaurora.org>
parent 9fc9808a
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -223,6 +223,8 @@ int32_t msm_camera_qup_i2c_write(struct msm_camera_i2c_client *client,
	rc = msm_camera_qup_i2c_txdata(client, buf, len);
	if (rc < 0)
		S_I2C_DBG("%s fail\n", __func__);
	kfree(buf);
	buf = NULL;
	return rc;
}

@@ -272,6 +274,8 @@ int32_t msm_camera_qup_i2c_write_seq(struct msm_camera_i2c_client *client,
	rc = msm_camera_qup_i2c_txdata(client, buf, len+num_byte);
	if (rc < 0)
		S_I2C_DBG("%s fail\n", __func__);
	kfree(buf);
	buf = NULL;
	return rc;
}