# HG changeset patch # User ib # Date 1390755674 0 # Node ID b1ef9c82a90c0a7da6484c3ba8c1b9b4e351b992 # Parent 123bf21dc4ea53633e8de76bc11dbe20246c03b7 Revise non-FreeType part of mplayerLoadFont(). Fix memory leaks. Free return value of get_path() and old font_name. diff -r 123bf21dc4ea -r b1ef9c82a90c gui/interface.c --- a/gui/interface.c Sun Jan 26 16:57:18 2014 +0000 +++ b/gui/interface.c Sun Jan 26 17:01:14 2014 +0000 @@ -1095,7 +1095,10 @@ if (!vo_font) gmp_msg(MSGT_GPLAYER, MSGL_ERR, MSGTR_CantLoadFont, font_name); } else { - font_name = gstrdup(get_path("font/font.desc")); + char *fname = get_path("font/font.desc"); + + setdup(&font_name, fname); + free(fname); vo_font = read_font_desc(font_name, font_factor, 0); if (!vo_font) {