Skip to content

Improve memory release with leave_room#75

Merged
ladvoc merged 2 commits intolivekit:mainfrom
gfroissard:gfr/improve-memory-release
Mar 4, 2026
Merged

Improve memory release with leave_room#75
ladvoc merged 2 commits intolivekit:mainfrom
gfroissard:gfr/improve-memory-release

Conversation

@gfroissard
Copy link
Copy Markdown
Contributor

Summary

This PR improve two things related of the usage of "leave_room" (function not called yet in the sample code).

Possible use after free

In some case, for example, the websocket can try to enqueue a message in a queue which has been freed but the pointer has not been set to NULL.

Possible memory leak

The event group is created by peer_create it is now released in peer_destroy in order to make it symmetric and avoid memory leak.

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Feb 15, 2026

CLA assistant check
All committers have signed the CLA.

@ladvoc ladvoc self-requested a review March 4, 2026 00:16
Copy link
Copy Markdown
Collaborator

@ladvoc ladvoc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM ✅

@ladvoc ladvoc merged commit 20c2946 into livekit:main Mar 4, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants