fix variout memory leaks
This commit is contained in:
parent
9ab7d1edff
commit
91ea5356fc
@ -181,7 +181,7 @@ void input_state_init(InputState *input) {
|
||||
|
||||
|
||||
void input_state_deinit(InputState *input) {
|
||||
shfree(input->action_hash);
|
||||
input_reset_state(input);
|
||||
}
|
||||
|
||||
|
||||
|
@ -534,10 +534,12 @@ static void clean_up(void) {
|
||||
scripting_deinit(ctx);
|
||||
*/
|
||||
|
||||
input_state_deinit(&ctx.game.input);
|
||||
input_state_deinit(&ctx.game.input);
|
||||
text_cache_deinit(&ctx.text_cache);
|
||||
textures_cache_deinit(&ctx.texture_cache);
|
||||
|
||||
textures_reset_state();
|
||||
|
||||
arrfree(ctx.render_queue_2d);
|
||||
|
||||
toml_free(ctx.config_table);
|
||||
|
@ -60,6 +60,7 @@ SDL_Surface *textures_load_surface(const char *path) {
|
||||
|
||||
int width, height, channels;
|
||||
void *image_mem = stbi_load_from_callbacks(&callbacks, &context, &width, &height, &channels, 0);
|
||||
SDL_FreeRW(handle);
|
||||
if (!image_mem)
|
||||
goto ERR_CANNOT_READ_IMAGE;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user