Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix memory leak #190

Merged
merged 1 commit into from
Aug 18, 2022
Merged

fix memory leak #190

merged 1 commit into from
Aug 18, 2022

Conversation

luxe
Copy link
Contributor

@luxe luxe commented Oct 1, 2017

XkbFreeClientMap -> XkbFreeKeyboard

XkbFreeClientMap -> XkbFreeKeyboard
@FascinatedBox
Copy link

@jordansissel Tested this patch. It still applies, and it fixes a memory leak.

@jordansissel
Copy link
Owner

Odd. Maybe this is a documentation (or implementation) bug in X11? The documentation for XkbGetMap shows:

To free the returned data, use XkbFreeClientMap.

So it should be "correct" to do what xdo is already doing, and yet, it leaks, as y'all have shown. Weird!

I thought about filing something upstream on X11, but it feels like that project is trying to self-terminate so I don't know if it'd be anything they would bother addresseing.

@jordansissel jordansissel merged commit b5d8d5c into jordansissel:master Aug 18, 2022
@jordansissel
Copy link
Owner

Thanks for this fix, btw! Also thanks to @FascinatedBox for testing <3

@jordansissel
Copy link
Owner

I made some sample code to reproduce this leak using only X11 libraries -- should someone wish to pursue this leak upstream with Xorg.

#385 (comment)

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