[vlc-commits] text_renderer: freetype: missing alloc check
Francois Cartegnie
git at videolan.org
Wed Jan 15 15:16:48 CET 2020
vlc | branch: master | Francois Cartegnie <git at videolan.org> | Wed Jan 15 14:11:24 2020 +0000| [0c863157496af1579d15d257614cff68e4e71f93] | committer: Thomas Guillem
text_renderer: freetype: missing alloc check
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0c863157496af1579d15d257614cff68e4e71f93
---
modules/text_renderer/freetype/platform_fonts.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/modules/text_renderer/freetype/platform_fonts.c b/modules/text_renderer/freetype/platform_fonts.c
index e586a06353..8cdbe7b91c 100644
--- a/modules/text_renderer/freetype/platform_fonts.c
+++ b/modules/text_renderer/freetype/platform_fonts.c
@@ -240,9 +240,10 @@ vlc_family_t *NewFamily( filter_t *p_filter, const char *psz_family,
const char *psz_key )
{
filter_sys_t *p_sys = p_filter->p_sys;
- vlc_family_t *p_family = NULL;
- p_family = calloc( 1, sizeof( *p_family ) );
+ vlc_family_t *p_family = calloc( 1, sizeof( *p_family ) );
+ if( unlikely(!p_family) )
+ return NULL;
char *psz_name;
if( psz_family && *psz_family )
More information about the vlc-commits
mailing list