fix a double free problem in jpeg.c
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 18 May 2010 10:03:09 +0000 (10:03 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 18 May 2010 10:03:09 +0000 (10:03 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10199 d7cf8633-e32d-0410-b094-e92efae38249

jpeg.c

diff --git a/jpeg.c b/jpeg.c
index 2220ccb..965f7c8 100644 (file)
--- a/jpeg.c
+++ b/jpeg.c
@@ -679,7 +679,7 @@ unsigned char* JPEG_LoadImage_BGRA (const unsigned char *f, int filesize)
 
                line++;
        }
-       Mem_Free (scanline);
+       Mem_Free (scanline); scanline = NULL;
 
        qjpeg_finish_decompress (&cinfo);
        qjpeg_destroy_decompress (&cinfo);