Skip to content

Commit

Permalink
Shortcuts: fixed possible memory leaks
Browse files Browse the repository at this point in the history
(only if there is an error when creating the icon)
  • Loading branch information
matttbe committed Oct 22, 2014
1 parent 4142f70 commit 8669bfe
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions shortcuts/src/applet-bookmarks.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
{
Expand Down

0 comments on commit 8669bfe

Please sign in to comment.