Merge pull request #366 from bebehei/memory-leak_1

Fix memory leak in get_pixbuf_from_path
This commit is contained in:
Nikos Tsipinakis 2017-09-01 11:02:51 +03:00 committed by GitHub
commit aae003d023

View File

@ -341,6 +341,7 @@ static GdkPixbuf *get_pixbuf_from_path(char *icon_path)
/* try svg */ /* try svg */
maybe_icon_path = g_strconcat(current_folder, "/", icon_path, ".svg", NULL); maybe_icon_path = g_strconcat(current_folder, "/", icon_path, ".svg", NULL);
if (!does_file_exist(maybe_icon_path)) { if (!does_file_exist(maybe_icon_path)) {
g_free(maybe_icon_path);
/* fallback to png */ /* fallback to png */
maybe_icon_path = g_strconcat(current_folder, "/", icon_path, ".png", NULL); maybe_icon_path = g_strconcat(current_folder, "/", icon_path, ".png", NULL);
} }