Skip to content

Commit

Permalink
openamp/rpmsg: fix rpmsg_service memory leak when stop remote
Browse files Browse the repository at this point in the history
when remote cannot send destroy message, master cannot call ns_unbind_cb
that will cause service cannot release release resources

Signed-off-by: Tao Yin <[email protected]>
  • Loading branch information
Tao Yin committed Oct 17, 2023
1 parent cd88238 commit 8242ff0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/rpmsg/rpmsg_virtio.c
Original file line number Diff line number Diff line change
Expand Up @@ -862,6 +862,8 @@ void rpmsg_deinit_vdev(struct rpmsg_virtio_device *rvdev)
node = rdev->endpoints.next;
ept = metal_container_of(node, struct rpmsg_endpoint, node);
rpmsg_destroy_ept(ept);
if (ept->ns_unbind_cb)
ept->ns_unbind_cb(ept);
}

rvdev->rvq = 0;
Expand Down

0 comments on commit 8242ff0

Please sign in to comment.