From 8669bfede6b4ce8152728ca146fee618a991be2e Mon Sep 17 00:00:00 2001 From: Matthieu Baerts Date: Wed, 22 Oct 2014 22:40:33 +0200 Subject: [PATCH] Shortcuts: fixed possible memory leaks (only if there is an error when creating the icon) --- shortcuts/src/applet-bookmarks.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/shortcuts/src/applet-bookmarks.c b/shortcuts/src/applet-bookmarks.c index 3f58d0a04..b8fb2e2d2 100755 --- a/shortcuts/src/applet-bookmarks.c +++ b/shortcuts/src/applet-bookmarks.c @@ -428,6 +428,8 @@ GList *cd_shortcuts_list_bookmarks (gchar *cBookmarkFilePath, GldiModuleInstance pDiskUsage->iLastCheckTime = 1e9; pBookmarkIconList = g_list_append (pBookmarkIconList, pNewIcon); } + else + g_free (cHome); gchar *cContent = NULL; gsize length = 0; @@ -455,6 +457,8 @@ GList *cd_shortcuts_list_bookmarks (gchar *cBookmarkFilePath, GldiModuleInstance pNewIcon = _cd_shortcuts_get_icon (cOneBookmark, cUserName, fCurrentOrder++); if (pNewIcon) pBookmarkIconList = g_list_append (pBookmarkIconList, pNewIcon); + else + g_free (cOneBookmark); } else {