Skip to content

Commit

Permalink
nrf_rpc: remove NULL pointer referenece
Browse files Browse the repository at this point in the history
In case of error, the group pointer may be set to NULL.
This reverts part of changes introduced in the following PR:
#1493

Ref: NCSDK-29976

Signed-off-by: Tomasz Chyrowicz <[email protected]>
  • Loading branch information
tomchy committed Oct 29, 2024
1 parent 4baac51 commit 8bb9f82
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions nrf_rpc/nrf_rpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -801,13 +801,7 @@ static void receive_handler(const struct nrf_rpc_tr *transport, const uint8_t *p
}

if (err < 0) {
internal_data.type = NRF_RPC_ERROR;
internal_data.group = group;
internal_data.err = err;
internal_data.hdr_id = hdr.id;
internal_data.hdr_type = hdr.type;
nrf_rpc_os_thread_pool_send((const uint8_t *)&internal_data, sizeof(internal_data));
nrf_rpc_os_event_wait(&group->data->decode_done_event, NRF_RPC_OS_WAIT_FOREVER);
nrf_rpc_err(err, NRF_RPC_ERR_SRC_RECV, group, hdr.id, hdr.type);
}
}

Expand Down

0 comments on commit 8bb9f82

Please sign in to comment.