Merge lp:~azzar1/unity/fix-some-memory-leaks2 into lp:unity

Proposed by Andrea Azzarone
Status: Merged
Approved by: Neil J. Patel
Approved revision: no longer in the source branch.
Merged at revision: 1329
Proposed branch: lp:~azzar1/unity/fix-some-memory-leaks2
Merge into: lp:unity
Diff against target: 30 lines (+6/-2)
2 files modified
plugins/unityshell/src/PlacesHomeView.cpp (+3/-2)
plugins/unityshell/src/PluginAdapter.cpp (+3/-0)
To merge this branch: bzr merge lp:~azzar1/unity/fix-some-memory-leaks2
Reviewer Review Type Date Requested Status
Neil J. Patel (community) Approve
Review via email: mp+69885@code.launchpad.net

Description of the change

Fixes two memory leaks in unity.

To post a comment you must log in.
Revision history for this message
Neil J. Patel (njpatel) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'plugins/unityshell/src/PlacesHomeView.cpp'
--- plugins/unityshell/src/PlacesHomeView.cpp 2011-07-21 14:59:25 +0000
+++ plugins/unityshell/src/PlacesHomeView.cpp 2011-07-30 12:46:00 +0000
@@ -297,9 +297,10 @@
297 // Email297 // Email
298 markup = gconf_client_get_string(_client, MAIL_DIR"/command", NULL);298 markup = gconf_client_get_string(_client, MAIL_DIR"/command", NULL);
299 // get the first word on key (the executable name itself)299 // get the first word on key (the executable name itself)
300 markup = g_strsplit(markup, " ", 0)[0];300 gchar** temp_array = g_strsplit(markup, " ", 0);
301 CreateShortcutFromExec(markup, _("Check Email"), _email_alternatives);
302 g_free(markup);301 g_free(markup);
302 CreateShortcutFromExec(temp_array[0], _("Check Email"), _email_alternatives);
303 g_strfreev(temp_array);
303304
304 // Music305 // Music
305 markup = gconf_client_get_string(_client, MEDIA_DIR"/exec", NULL);306 markup = gconf_client_get_string(_client, MEDIA_DIR"/exec", NULL);
306307
=== modified file 'plugins/unityshell/src/PluginAdapter.cpp'
--- plugins/unityshell/src/PluginAdapter.cpp 2011-07-26 12:33:23 +0000
+++ plugins/unityshell/src/PluginAdapter.cpp 2011-07-30 12:46:00 +0000
@@ -612,6 +612,9 @@
612 {612 {
613 win_wmclass = classHint.res_class;613 win_wmclass = classHint.res_class;
614 XFree(classHint.res_class);614 XFree(classHint.res_class);
615
616 if (classHint.res_name)
617 XFree(classHint.res_name);
615 }618 }
616 else619 else
617 return;620 return;