Skip to content

Commit

Permalink
We need to remove the stream ourselves when the call to FT_Open_Face …
Browse files Browse the repository at this point in the history
…fails.
  • Loading branch information
dlemstra committed Jun 23, 2022
1 parent 4393e83 commit 518a834
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions magick/annotate.c
Original file line number Diff line number Diff line change
Expand Up @@ -1508,6 +1508,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 518a834

Please sign in to comment.