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 756261 - MetaIdleMonitorNative: fix leak
MetaIdleMonitorNative: fix leak
Status: RESOLVED DUPLICATE of bug 760476
Product: mutter
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks:
 
 
Reported: 2015-10-08 21:02 UTC by Owen Taylor
Modified: 2016-05-11 13:32 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
MetaIdleMonitorNative: fix leak (822 bytes, patch)
2015-10-08 21:02 UTC, Owen Taylor
none Details | Review

Description Owen Taylor 2015-10-08 21:02:11 UTC
A user-active watch would be leaked after firing it.
Comment 1 Owen Taylor 2015-10-08 21:02:14 UTC
Created attachment 312924 [details] [review]
MetaIdleMonitorNative: fix leak
Comment 2 Jasper St. Pierre (not reading bugmail) 2015-10-08 21:07:44 UTC
Review of attachment 312924 [details] [review]:

::: src/backends/native/meta-idle-monitor-native.c
@@ +201,3 @@
 {
   _meta_idle_monitor_watch_fire (watch);
+  free_watch (watch);

Should we simply use g_hash_table_foreach_remove instead?
Comment 3 Rui Matos 2016-05-11 13:32:43 UTC
This was fixed differently in bug 760476 by avoiding the g_hash_table_foreach_steal() which is what Jasper was arguing for here, I think.

*** This bug has been marked as a duplicate of bug 760476 ***