Skip to content

Commit a149232

Browse files
Ramakrishna Pallalanashif
authored andcommitted
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>
1 parent dccd275 commit a149232

File tree

1 file changed

+1
-1
lines changed
  • tests/kernel/fifo/fifo_timeout/src

1 file changed

+1
-1
lines changed

tests/kernel/fifo/fifo_timeout/src/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ static int test_multiple_threads_get_data(struct timeout_order_data *test_data,
210210
}
211211

212212
data = k_fifo_get(&timeout_order_fifo, K_FOREVER);
213-
if (data->q_order == ii) {
213+
if (data && data->q_order == ii) {
214214
TC_PRINT(" thread (q order: %d, t/o: %d, fifo %p)\n",
215215
data->q_order, data->timeout, data->fifo);
216216
} else {

0 commit comments

Comments
 (0)