From e5d050c22d49906a915af0aa8fe7a4182f628813 Mon Sep 17 00:00:00 2001 From: Allanis Date: Tue, 6 Aug 2013 19:44:53 +0100 Subject: [PATCH] [Fix] Another memleak. :/ --- src/lephisto.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/lephisto.c b/src/lephisto.c index 4225a82..3d6e900 100644 --- a/src/lephisto.c +++ b/src/lephisto.c @@ -238,12 +238,11 @@ void load_screen(void) { files = pack_listfiles(data, &nfiles); len = strlen("../gfx/loading"); nload = 0; - for(i = 0; i < (int)nfiles; i++) - if(strncmp(files[i], "../gfx/loading", len)==0) { + for(i = 0; i < (int)nfiles; i++) { + if(strncmp(files[i], "../gfx/loading", len)==0) nload++; - free(files[i]); - } - free(files); + free(files[i]); + } /* Must have loading screens. */ if(nload == 0) {