tests: kernel: fifo: Do NULL pointer check before accessing data
Do NULL pointer check before accessing data. CID: 186058 Fixes Issue #7716 Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com>
This commit is contained in:
parent
dccd275349
commit
a1492325c0
1 changed files with 1 additions and 1 deletions
|
@ -210,7 +210,7 @@ static int test_multiple_threads_get_data(struct timeout_order_data *test_data,
|
|||
}
|
||||
|
||||
data = k_fifo_get(&timeout_order_fifo, K_FOREVER);
|
||||
if (data->q_order == ii) {
|
||||
if (data && data->q_order == ii) {
|
||||
TC_PRINT(" thread (q order: %d, t/o: %d, fifo %p)\n",
|
||||
data->q_order, data->timeout, data->fifo);
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue