From d0d4509a66a143530db1f89ac0a1b079c4693e8e Mon Sep 17 00:00:00 2001 From: sajt Date: Sat, 25 Mar 2006 07:25:45 +0000 Subject: [PATCH] 'Cruft' removal (removed GAME_FNIGGIUM) Fixed a very minor 'potential' leak in JPEG loading git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6186 d7cf8633-e32d-0410-b094-e92efae38249 --- common.c | 3 --- common.h | 1 - jpeg.c | 4 +++- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/common.c b/common.c index efea4851..a510c060 100644 --- a/common.c +++ b/common.c @@ -1002,9 +1002,6 @@ static const gamemode_info_t gamemode_info [] = // GAME_ZYMOTIC // COMMANDLINEOPTION: Game: -zymotic runs the singleplayer game Zymotic { "zymotic", "-zymotic", "Zymotic", "basezym", NULL, "zymotic", "zymotic" }, -// GAME_FNIGGIUM -// COMMANDLINEOPTION: Game: -fniggium runs the post apocalyptic melee RPG Fniggium -{ "fniggium", "-fniggium", "Fniggium", "data", NULL, "fniggium", "fniggium" }, // GAME_SETHERAL // COMMANDLINEOPTION: Game: -setheral runs the multiplayer game Setheral { "setheral", "-setheral", "Setheral", "data", NULL, "setheral", "setheral" }, diff --git a/common.h b/common.h index e452e2e0..ac7e6cbc 100644 --- a/common.h +++ b/common.h @@ -246,7 +246,6 @@ typedef enum gamemode_e GAME_TEU, GAME_BATTLEMECH, GAME_ZYMOTIC, - GAME_FNIGGIUM, GAME_SETHERAL, GAME_SOM, GAME_TENEBRAE, // full of evil hackery diff --git a/jpeg.c b/jpeg.c index 7e503d3b..ebdab17c 100644 --- a/jpeg.c +++ b/jpeg.c @@ -534,8 +534,10 @@ unsigned char* JPEG_LoadImage (const unsigned char *f, int filesize, int matchwi scanline = (unsigned char *)Mem_Alloc(tempmempool, image_width * cinfo.output_components); if (!image_rgba || !scanline) { - if (!image_rgba) + if (image_rgba) Mem_Free (image_rgba); + if (scanline) + Mem_Free (scanline); Con_Printf("JPEG_LoadImage: not enough memory for %i by %i image\n", image_width, image_height); qjpeg_finish_decompress (&cinfo); -- 2.39.2