Skip to content

Commit

Permalink
nuttx/usrsock: fix rpmsg_usrsock memory leak when stop remote
Browse files Browse the repository at this point in the history
1 0x826037 in host_memalign sim/posix/sim_hostmemory.c:180
2 0x82665a in host_realloc sim/posix/sim_hostmemory.c:222
3 0x6320b8 in mm_realloc sim/sim_heap.c:261
4 0x63201f in mm_malloc sim/sim_heap.c:193
5 0x632124 in mm_zalloc sim/sim_heap.c:296
6 0x62cbd2 in zalloc umm_heap/umm_zalloc.c:70
7 0x5f3548 in usrsock_rpmsg_ns_bind usrsock/usrsock_rpmsg_server.c:977
8 0x5cdb7a in rptun_ns_bind rptun/rptun.c:604
9 0x760a94 in rpmsg_virtio_ns_callback open-amp/lib/rpmsg/rpmsg_virtio.c:676
10 0x75f958 in rpmsg_virtio_rx_callback open-amp/lib/rpmsg/rpmsg_virtio.c:583
11 0x76b2c6 in virtqueue_notification open-amp/lib/virtio/virtqueue.c:711
12 0x756872 in rproc_virtio_notified open-amp/lib/remoteproc/remoteproc_virtio.c:433
13 0x751d2c in remoteproc_get_notification open-amp/lib/remoteproc/remoteproc.c:1005
14 0x5caa15 in rptun_worker rptun/rptun.c:344
15 0x5cabc7 in rptun_thread rptun/rptun.c:380
16 0x5849ca in nxtask_start task/task_start.c:129
17 0x62fd6a in pre_start sim/sim_initialstate.c:52

Signed-off-by: yintao <yintao@xiaomi.com>
  • Loading branch information
yintao authored and xiaoxiang781216 committed Sep 7, 2023
1 parent 987afb1 commit 23dee24
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/usrsock/usrsock_rpmsg_server.c
Original file line number Diff line number Diff line change
Expand Up @@ -1023,6 +1023,7 @@ static void usrsock_rpmsg_ns_unbind(FAR struct rpmsg_endpoint *ept)
}

rpmsg_destroy_ept(ept);
kmm_free(ept);
}

static int usrsock_rpmsg_ept_cb(FAR struct rpmsg_endpoint *ept,
Expand Down

0 comments on commit 23dee24

Please sign in to comment.