Skip to content

fix memory leak on wayland#535

Open
uni-dos wants to merge 2 commits into
ColleagueRiley:mainfrom
uni-dos:wayland-memleak
Open

fix memory leak on wayland#535
uni-dos wants to merge 2 commits into
ColleagueRiley:mainfrom
uni-dos:wayland-memleak

Conversation

@uni-dos
Copy link
Copy Markdown
Contributor

@uni-dos uni-dos commented May 23, 2026

No description provided.

@ColleagueRiley
Copy link
Copy Markdown
Owner

It's nice to see you contributing in the community again especially since you wrote a lot of the code for the Wayland backend.

Unfortunately this fix seems incorrect.

monitor->node->modes is set to modes as a realloc:

	monitor->node->modes = modes;

	if (flags & WL_OUTPUT_MODE_CURRENT) {
		monitor->mode = mode;
	}

	RGFW_FREE(modes);

It is monitor->node->modes that needs to be freed when the monitor is freed.

@uni-dos
Copy link
Copy Markdown
Contributor Author

uni-dos commented May 28, 2026

I knew that was a naive fix. I was trying to search the other uses of it

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.

2 participants