mirror of https://github.com/encounter/SDL.git
Fixed a memory leak (thanks, Zack!).
We should probably rework this piece of code a little more after 2.0.4 ships, though. Fixes Bugzilla #3004.
This commit is contained in:
parent
8a85084fc1
commit
699f879a8f
|
@ -461,10 +461,12 @@ SDL_IBus_Init(void)
|
||||||
return SDL_FALSE;
|
return SDL_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* !!! FIXME: if ibus_addr_file != NULL, this will overwrite it and leak (twice!) */
|
||||||
ibus_addr_file = SDL_strdup(addr_file);
|
ibus_addr_file = SDL_strdup(addr_file);
|
||||||
|
|
||||||
addr = IBus_ReadAddressFromFile(addr_file);
|
addr = IBus_ReadAddressFromFile(addr_file);
|
||||||
if (!addr) {
|
if (!addr) {
|
||||||
|
SDL_free(addr_file);
|
||||||
return SDL_FALSE;
|
return SDL_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue