Merge lp:~pete-woods/qmenumodel/fix-memory-leak into lp:~phablet-team/qmenumodel/trunk

Proposed by Pete Woods
Status: Merged
Approved by: Pete Woods
Approved revision: 90
Merged at revision: 90
Proposed branch: lp:~pete-woods/qmenumodel/fix-memory-leak
Merge into: lp:~phablet-team/qmenumodel/trunk
Diff against target: 11 lines (+1/-0)
1 file modified
libqmenumodel/src/unitymenumodel.cpp (+1/-0)
To merge this branch: bzr merge lp:~pete-woods/qmenumodel/fix-memory-leak
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve
Lars Karlitski (community) Approve
Review via email: mp+186023@code.launchpad.net

Commit message

Fix memory leak in unitymenumodel

The items sequence is not being freed in the destructor.

Description of the change

Fix memory leak in unitymenumodel

The items sequence is not being freed in the destructor.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Pete Woods (pete-woods) wrote :

Perhaps there is a good reason for this sequence not being destroyed that I don't understand due to lack of familiarity with the codebase?

Revision history for this message
Lars Karlitski (larsu) wrote :

> Perhaps there is a good reason for this sequence not being destroyed that I
> don't understand due to lack of familiarity with the codebase?

Nope, this is a legit memory leak. Good catch. Thanks!

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'libqmenumodel/src/unitymenumodel.cpp'
2--- libqmenumodel/src/unitymenumodel.cpp 2013-09-03 11:17:30 +0000
3+++ libqmenumodel/src/unitymenumodel.cpp 2013-09-17 12:34:27 +0000
4@@ -136,6 +136,7 @@
5 {
6 this->clearItems(false);
7
8+ g_sequence_free(this->items);
9 g_clear_pointer (&this->menutracker, gtk_menu_tracker_free);
10 g_clear_object (&this->muxer);
11 g_clear_object (&this->connection);

Subscribers

People subscribed via source and target branches