| Summary: | [patch] Fix IBus leaking memory (D-Bus address filename) | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Zack Middleton (zturtleman) <zack> |
| Component: | *don't know* | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | sezeroz |
| Version: | HG 2.0 | Keywords: | target-2.0.4 |
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Attachments: | Patch to fix IBus memory leak | ||
|
Description
Zack Middleton (zturtleman)
2015-06-07 16:27:38 UTC
This patch is now https://hg.libsdl.org/SDL/rev/a964d651f1dd, thanks! --ryan. The patch looks incorrect to me. The strdup'ed string is ibus_addr_file and not addr_file, so you actually need the following? - SDL_free(addr_file); + SDL_free(ibus_addr_file); (In reply to Ozkan Sezer from comment #2) > The patch looks incorrect to me. The strdup'ed string is ibus_addr_file > and not addr_file, so you actually need the following? > > - SDL_free(addr_file); > + SDL_free(ibus_addr_file); IBus_GetDBusAddressFilename() returns an allocated string to "addr_file" that we need to free in this failure case. "ibus_addr_file" is a global var we free elsewhere. This code is nasty in any case, and needs to be cleaned up (it's confusing about who is strdup()'ing what and where, etc), but I'll do that after 2.0.4 ships. --ryan. |