forked from rosebudai/OpenRCT2-Web
Plug memory leak in cmdline_sprite.c
This commit is contained in:
1 parent
3c4a683701
commit
fa4c5ace25
1 file changed
+3
-2
@@ -193,8 +193,8 @@ static bool sprite_file_save(const char *path)
|
||||
|
||||
static void sprite_file_close()
|
||||
{
|
||||
free(spriteFileEntries);
|
||||
free(spriteFileData);
|
||||
SafeFree(spriteFileEntries);
|
||||
SafeFree(spriteFileData);
|
||||
}
|
||||
|
||||
static bool sprite_file_export(int spriteIndex, const char *outPath)
|
||||
@@ -689,6 +689,7 @@ int cmdline_for_sprite(const char **argv, int argc)
|
||||
}
|
||||
if (!silent)
|
||||
fprintf(stdout, "Added: %s\n", imagePath);
|
||||
sprite_file_close();
|
||||
}
|
||||
i++;
|
||||
} while (file != NULL);
|
||||
|
||||
Reference in new issue
Block a user