From 57865138b9178fa099c0c80a895d01100da51a90 Mon Sep 17 00:00:00 2001 From: Garux Date: Tue, 23 Apr 2019 18:22:24 +0300 Subject: [PATCH] g_free after g_object_get --- libs/gtkutil/glfont.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/gtkutil/glfont.cpp b/libs/gtkutil/glfont.cpp index 7026d388..e5c9fb7d 100644 --- a/libs/gtkutil/glfont.cpp +++ b/libs/gtkutil/glfont.cpp @@ -699,8 +699,8 @@ GLFont *glfont_create( const char* font_string ){ GtkSettings *settings = gtk_settings_get_default(); gchar *fontname; g_object_get( settings, "gtk-font-name", &fontname, NULL ); - if( ( font = tryFont( fontname, font_desc, font_list_base ) ) ) - break; + font = tryFont( fontname, font_desc, font_list_base ); + g_free( fontname ); } while ( 0 ); PangoFontMap *fontmap = 0;