Summary: | memory leak from using dbus_g_method_get_sender wrong | ||
---|---|---|---|
Product: | Telepathy | Reporter: | Simon McVittie <smcv> |
Component: | mission-control | Assignee: | Simon McVittie <smcv> |
Status: | RESOLVED FIXED | QA Contact: | Telepathy bugs list <telepathy-bugs> |
Severity: | normal | ||
Priority: | medium | Keywords: | patch |
Version: | unspecified | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: |
[5.16] fix memory leaks: dbus_g_method_get_sender returns a copy
[5.16] dispatcher_delegate_channels: initialize am |
Description
Simon McVittie
2014-03-20 13:01:52 UTC
Created attachment 96102 [details] [review] [5.16] fix memory leaks: dbus_g_method_get_sender returns a copy We were semi-consistently using it wrong. Created attachment 96103 [details] [review] [5.16] dispatcher_delegate_channels: initialize am Otherwise, if we "goto error" too soon, we'll try to g_object_unref uninitialized memory. gcc doesn't spot that because we're using tp_clear_object, which uses an intermediate variable, and it doesn't propagate "uninitializedness" through assignments. --- Happened to notice this while writing the previous patch. Comment on attachment 96102 [details] [review] [5.16] fix memory leaks: dbus_g_method_get_sender returns a copy Review of attachment 96102 [details] [review]: ----------------------------------------------------------------- ++ Comment on attachment 96103 [details] [review] [5.16] dispatcher_delegate_channels: initialize am Review of attachment 96103 [details] [review]: ----------------------------------------------------------------- ++ Merged. commit f576a9e8a125c16e3a562e3bb820707c1041af5c Author: Simon McVittie <simon.mcvittie@collabora.co.uk> Date: Thu Mar 20 12:53:39 2014 +0000 dispatcher_delegate_channels: initialize am Otherwise, if we "goto error" too soon, we'll try to g_object_unref uninitialized memory. gcc doesn't spot that because we're using tp_clear_object, which uses an intermediate variable, and it doesn't propagate "uninitializedness" through assignments. commit 43afd2866bc38efe1b2cf27989df4e36ddd21201 Author: Simon McVittie <simon.mcvittie@collabora.co.uk> Date: Thu Mar 20 12:51:18 2014 +0000 fix memory leaks: dbus_g_method_get_sender returns a copy We were semi-consistently using it wrong. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.