mirror of
https://github.com/apache/nuttx.git
synced 2026-08-18 11:41:51 +08:00
sim/sim_rptun: Check if the shared memory has been allocated
Bug fix Signed-off-by: yintao <yintao@xiaomi.com>
This commit is contained in:
@@ -102,6 +102,11 @@ sim_rptun_get_resource(struct rptun_dev_s *dev)
|
||||
priv->shmem = host_allocshmem(priv->shmemname,
|
||||
sizeof(*priv->shmem));
|
||||
|
||||
if (!priv->shmem)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (priv->master)
|
||||
{
|
||||
struct rptun_rsc_s *rsc = &priv->shmem->rsc;
|
||||
|
||||
Reference in New Issue
Block a user