Skip to content

Commit

Permalink
Fixed a memory leak (thanks, Zack!).
Browse files Browse the repository at this point in the history
We should probably rework this piece of code a little more after 2.0.4 ships,
though.

Fixes Bugzilla #3004.
  • Loading branch information
icculus committed Jun 7, 2015
1 parent 8a85084 commit 699f879
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/core/linux/SDL_ibus.c
Expand Up @@ -461,10 +461,12 @@ SDL_IBus_Init(void)
return SDL_FALSE;
}

/* !!! FIXME: if ibus_addr_file != NULL, this will overwrite it and leak (twice!) */
ibus_addr_file = SDL_strdup(addr_file);

addr = IBus_ReadAddressFromFile(addr_file);
if (!addr) {
SDL_free(addr_file);
return SDL_FALSE;
}

Expand Down

0 comments on commit 699f879

Please sign in to comment.