Commit ef9d8f4
committed
fix(ipc): guard LOG_D against null thread pointer in rt_susp_list_dequeue
When rt_susp_list_dequeue() returns RT_NULL (empty suspended list), the
LOG_D call dereferenced thread->parent.name without a null check, causing
a crash in debug builds.
Per @wdfk-prog review feedback, push the null check into the LOG_D
argument using a ternary so the entire expression — including the null
check — is compiled out when LOG_D is disabled. This avoids an unnecessary
runtime branch in release builds.
Also fix a typo in the change-log header: 'redesigen' -> 'redesign'.
Signed-off-by: Srikanth Patchava <srpatcha@users.noreply.github.com>1 parent 96c0ce2 commit ef9d8f4
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| |||
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
143 | | - | |
| 143 | + | |
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
| |||
0 commit comments