Memory leak in SDL_IBus_Init
Bug #1839447 reported by
Alex G
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
libsdl2 (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
When the IBUS initialization fails a string is leaked:
addr = IBus_ReadAddres
if (!addr) {
return SDL_FALSE; // This will make the SDL_IBus_Quit not called hence ibus_addr_file is not freed
}
Possible solution: Move the ibus_addr_file assignment to the bottom and make it conditional on result (only copy if true)
Found via LSAN after a simple SDL_InitVideo(); SDL_Quit(); from inside dynamically loaded shared library.
To post a comment you must log in.