-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
clipmenud: Ensure consistent memory management for clipboard text
Previously, clipboard text was sometimes freed with XFree() and sometimes with free(), potentially causing double frees when using the INCR protocol for large clippings. Convert the XGetWindowProperty()-allocated memory to a malloc()-allocated buffer immediately in get_clipboard_text(), and always free it with free(). Fixes #241.
- Loading branch information
Showing
2 changed files
with
75 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters