Skip to content

Commit

Permalink
Moved the free to the correct position to fix #4446.
Browse files Browse the repository at this point in the history
  • Loading branch information
dlemstra committed Nov 6, 2021
1 parent 7fef3c3 commit 82775af
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion coders/dcm.c
Expand Up @@ -3996,10 +3996,11 @@ static Image *ReadDCMImage(const ImageInfo *image_info,ExceptionInfo *exception)
(void) RelinquishUniqueFileResource(filename);
}
read_info=DestroyImageInfo(read_info);
RelinquishDCMMemory(&info,&map,stream_info,stack,data);
image=DestroyImageList(image);
if ((status == MagickFalse) && (exception->severity < ErrorException))
ThrowDCMException(CorruptImageError,"CorruptImageError")
else
RelinquishDCMMemory(&info,&map,stream_info,stack,data);
return(GetFirstImageInList(images));
}
if (info.depth != (1UL*MAGICKCORE_QUANTUM_DEPTH))
Expand Down

0 comments on commit 82775af

Please sign in to comment.