]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
'Cruft' removal (removed GAME_FNIGGIUM)
authorsajt <sajt@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 25 Mar 2006 07:25:45 +0000 (07:25 +0000)
committersajt <sajt@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 25 Mar 2006 07:25:45 +0000 (07:25 +0000)
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
common.h
jpeg.c

index efea48511f9f20c4e4951563c91cabd8fe37159e..a510c060d86215b5fec166db6e056b28d275d7ac 100644 (file)
--- 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" },
index e452e2e0f4496eab08cb795fc1d42d4ba977a68b..ac7e6cbc0d19fdf24e15b034a3da1c1e719688fd 100644 (file)
--- 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 7e503d3b4d24ce85748762aeaeaee7534a2fdd7d..ebdab17ce65acef9e6b2edcf197e1dac3cc54606 100644 (file)
--- 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);