Skip to content

Commit

Permalink
We need to free the stream ourselves when the call to FT_Open_Face fa…
Browse files Browse the repository at this point in the history
…ils.
  • Loading branch information
dlemstra committed Jun 23, 2022
1 parent b11d647 commit a1eb122
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions MagickCore/annotate.c
Expand Up @@ -1534,6 +1534,7 @@ static MagickBooleanType RenderFreetype(Image *image,const DrawInfo *draw_info,
ft_status=FT_Open_Face(library,&args,face_index,&face);
if (ft_status != 0)
{
stream=RelinquishMagickMemory(stream);
(void) FT_Done_FreeType(library);
ThrowFreetypeErrorException("UnableToReadFont",ft_status,args.pathname);
args.pathname=DestroyString(args.pathname);
Expand Down

0 comments on commit a1eb122

Please sign in to comment.