Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
Cristy committed Apr 27, 2017
1 parent a353ee3 commit 79e5dbc
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions coders/mat.c
Original file line number Diff line number Diff line change
Expand Up @@ -627,6 +627,7 @@ static Image *ReadMATImageV4(const ImageInfo *image_info,Image *image,
depth;


quantum_info=(QuantumInfo *) NULL;
(void) SeekBlob(image,0,SEEK_SET);
while (EOFBlob(image) != MagickFalse)
{
Expand Down Expand Up @@ -772,7 +773,8 @@ static Image *ReadMATImageV4(const ImageInfo *image_info,Image *image,
else
InsertComplexFloatRow(image,(float *) pixels,y,0,0,exception);
}
quantum_info=DestroyQuantumInfo(quantum_info);
if (quantum_info != (QuantumInfo *) NULL)
quantum_info=DestroyQuantumInfo(quantum_info);
rotate_image=RotateImage(image,90.0,exception);
if (rotate_image != (Image *) NULL)
{
Expand Down Expand Up @@ -890,6 +892,7 @@ static Image *ReadMATImage(const ImageInfo *image_info,ExceptionInfo *exception)
/*
Read MATLAB image.
*/
quantum_info=(QuantumInfo *) NULL;
clone_info=CloneImageInfo(image_info);
if (ReadBlob(image,124,(unsigned char *) &MATLAB_HDR.identific) != 124)
ThrowReaderException(CorruptImageError,"ImproperImageHeader");
Expand Down Expand Up @@ -1290,7 +1293,8 @@ RestoreMSCWarning
}

RelinquishMagickMemory(BImgBuff);
quantum_info=DestroyQuantumInfo(quantum_info);
if (quantum_info != (QuantumInfo *) NULL)
quantum_info=DestroyQuantumInfo(quantum_info);
END_OF_READING:
clone_info=DestroyImageInfo(clone_info);
CloseBlob(image);
Expand Down

0 comments on commit 79e5dbc

Please sign in to comment.