Skip to content
Permalink
Browse files Browse the repository at this point in the history
https://github.com/ImageMagick/ImageMagick/issues/1589
  • Loading branch information
Cristy committed Jun 16, 2019
1 parent d08250e commit f595a19
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions MagickCore/annotate.c
Expand Up @@ -274,7 +274,11 @@ MagickExport MagickBooleanType AnnotateImage(Image *image,
number_lines++;
textlist=AcquireQuantumMemory(number_lines+1,sizeof(*textlist));
if (textlist == (char **) NULL)
return(MagickFalse);
{
annotate_info=DestroyDrawInfo(annotate_info);
annotate=DestroyDrawInfo(annotate);
return(MagickFalse);
}
p=text;
for (i=0; i < number_lines; i++)
{
Expand Down Expand Up @@ -303,7 +307,12 @@ MagickExport MagickBooleanType AnnotateImage(Image *image,
(void) ParseGeometry(annotate_info->geometry,&geometry_info);
}
if (SetImageStorageClass(image,DirectClass,exception) == MagickFalse)
return(MagickFalse);
{
annotate_info=DestroyDrawInfo(annotate_info);
annotate=DestroyDrawInfo(annotate);
textlist=(char **) RelinquishMagickMemory(textlist);
return(MagickFalse);
}
if (IsGrayColorspace(image->colorspace) != MagickFalse)
(void) SetImageColorspace(image,sRGBColorspace,exception);
status=MagickTrue;
Expand Down

0 comments on commit f595a19

Please sign in to comment.