After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 765694 - two memory leaks in gvc-mixer-control
two memory leaks in gvc-mixer-control
Status: RESOLVED FIXED
Product: libgnome-volume-control
Classification: Other
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: libgnome-volume-control-maint
libgnome-volume-control-maint
Depends on:
Blocks:
 
 
Reported: 2016-04-27 20:15 UTC by Alberts Muktupāvels
Modified: 2017-04-06 12:38 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
mixer-control: fix two memory leaks (1.05 KB, patch)
2016-04-27 20:15 UTC, Alberts Muktupāvels
needs-work Details | Review
mixer-control: Fix extra reference being leaked (1.61 KB, patch)
2017-04-06 12:36 UTC, Bastien Nocera
committed Details | Review

Description Alberts Muktupāvels 2016-04-27 20:15:08 UTC
Created attachment 326892 [details] [review]
mixer-control: fix two memory leaks

In both cases objects are inserted in hash table by adding extra
ref, but existing ref is never removed.
Comment 1 Bastien Nocera 2016-04-28 10:00:44 UTC
Review of attachment 326892 [details] [review]:

This is likely correct, but I'd like you to create a test case for the problem, similar to the one added in 25bf3ed75fa604fa73e8b25241119a993fc659d6.
That would make it easy to test the patch, and you could add the valgrind output for those errors in the commit message (likely splitting the patch in 2 as well).
Comment 2 Bastien Nocera 2017-04-06 12:36:55 UTC
Created attachment 349362 [details] [review]
mixer-control: Fix extra reference being leaked

In both cases objects are inserted in hash table by adding an
extra ref, but the existing reference was never removed. Don't
add a reference instead, so we don't end up with a spare one.

Based on patch by Alberts Muktupāvels <alberts.muktupavels@gmail.com>
Comment 3 Bastien Nocera 2017-04-06 12:38:14 UTC
Attachment 349362 [details] pushed as d52194f - mixer-control: Fix extra reference being leaked