* libtiff/tif_jpeg.c (JPEGCleanup): Fix Coverity 298624
"Dereference before null check".
This commit is contained in:
parent
d875609a32
commit
86f9adb7fd
@ -1,5 +1,8 @@
|
|||||||
2015-05-30 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
|
2015-05-30 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
|
||||||
|
|
||||||
|
* libtiff/tif_jpeg.c (JPEGCleanup): Fix Coverity 298624
|
||||||
|
"Dereference before null check".
|
||||||
|
|
||||||
* libtiff/tif_ojpeg.c (OJPEGReadBufferFill): Fix Coverity 603400
|
* libtiff/tif_ojpeg.c (OJPEGReadBufferFill): Fix Coverity 603400
|
||||||
"Missing break in switch".
|
"Missing break in switch".
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $Id: tif_jpeg.c,v 1.114 2014-12-30 16:37:22 erouault Exp $ */
|
/* $Id: tif_jpeg.c,v 1.115 2015-05-30 23:52:24 bfriesen Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1994-1997 Sam Leffler
|
* Copyright (c) 1994-1997 Sam Leffler
|
||||||
@ -2016,13 +2016,10 @@ JPEGCleanup(TIFF* tif)
|
|||||||
tif->tif_tagmethods.vgetfield = sp->vgetparent;
|
tif->tif_tagmethods.vgetfield = sp->vgetparent;
|
||||||
tif->tif_tagmethods.vsetfield = sp->vsetparent;
|
tif->tif_tagmethods.vsetfield = sp->vsetparent;
|
||||||
tif->tif_tagmethods.printdir = sp->printdir;
|
tif->tif_tagmethods.printdir = sp->printdir;
|
||||||
|
if( sp->cinfo_initialized )
|
||||||
if( sp != NULL ) {
|
TIFFjpeg_destroy(sp); /* release libjpeg resources */
|
||||||
if( sp->cinfo_initialized )
|
if (sp->jpegtables) /* tag value */
|
||||||
TIFFjpeg_destroy(sp); /* release libjpeg resources */
|
_TIFFfree(sp->jpegtables);
|
||||||
if (sp->jpegtables) /* tag value */
|
|
||||||
_TIFFfree(sp->jpegtables);
|
|
||||||
}
|
|
||||||
_TIFFfree(tif->tif_data); /* release local state */
|
_TIFFfree(tif->tif_data); /* release local state */
|
||||||
tif->tif_data = NULL;
|
tif->tif_data = NULL;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user