From 5f9f485b7f053629ae67d0732fcdf3254450695e Mon Sep 17 00:00:00 2001 From: Oleg Oshmyan Date: Tue, 1 Dec 2015 17:40:45 +0200 Subject: [PATCH] fontselect: destroy private data of fonts that fail to be added --- libass/ass_fontselect.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libass/ass_fontselect.c b/libass/ass_fontselect.c index 9fd873b..dc98f5e 100644 --- a/libass/ass_fontselect.c +++ b/libass/ass_fontselect.c @@ -349,6 +349,10 @@ ass_font_provider_add_font(ASS_FontProvider *provider, error: ass_font_provider_free_fontinfo(info); + + if (provider->funcs.destroy_font) + provider->funcs.destroy_font(data); + return false; } -- 2.40.0