Skip to content

Commit

Permalink
Fixed possible memory leak.
Browse files Browse the repository at this point in the history
  • Loading branch information
dlemstra committed Jul 16, 2023
1 parent c90e79b commit 24a88a9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion magick/annotate.c
Original file line number Diff line number Diff line change
Expand Up @@ -784,7 +784,10 @@ MagickExport MagickBooleanType GetMultilineTypeMetrics(Image *image,
*/
textlist=StringToStrings(draw_info->text,&count);
if (textlist == (char **) NULL)
return(MagickFalse);
{
annotate_info=DestroyDrawInfo(annotate_info);
return(MagickFalse);
}
annotate_info->render=MagickFalse;
annotate_info->direction=UndefinedDirection;
(void) memset(metrics,0,sizeof(*metrics));
Expand Down

0 comments on commit 24a88a9

Please sign in to comment.