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

Commit ac9dbb9b authored by Huang Yiwei's avatar Huang Yiwei
Browse files

msm_bus: Check if cldata->pdata is null before access it



Since msm_bus_cldata may have empty pdata or handle member, add the
check before access it.

Change-Id: Ieed25b23f10e6cc67b7a8b714850e0acb2e6563b
Signed-off-by: default avatarHuang Yiwei <quic_hyiwei@quicinc.com>
parent bc05ab3b
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -562,7 +562,8 @@ static ssize_t msm_bus_dbg_update_request_write(struct file *file,


	rt_mutex_lock(&msm_bus_dbg_cllist_lock);
	rt_mutex_lock(&msm_bus_dbg_cllist_lock);
	list_for_each_entry(cldata, &cl_list, list) {
	list_for_each_entry(cldata, &cl_list, list) {
		if (strnstr(chid, cldata->pdata->name, cnt)) {
		if (cldata->pdata &&
			strnstr(chid, cldata->pdata->name, cnt)) {
			found = 1;
			found = 1;
			strsep(&chid, " ");
			strsep(&chid, " ");
			if (chid) {
			if (chid) {