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 792808 - Use g_auto to reduce memory leaks
Use g_auto to reduce memory leaks
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: Mouse
git master
Other Linux
: Normal normal
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2018-01-23 02:47 UTC by Robert Ancell
Modified: 2018-01-23 03:00 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
mouse: Use g_auto for variables (3.33 KB, patch)
2018-01-23 02:48 UTC, Robert Ancell
committed Details | Review

Description Robert Ancell 2018-01-23 02:47:46 UTC
Use the g_auto macros to reduce memory leaks. Fixed some GError leaks with this.
Comment 1 Robert Ancell 2018-01-23 02:48:32 UTC
Created attachment 367274 [details] [review]
mouse: Use g_auto for variables
Comment 2 Georges Basile Stavracas Neto 2018-01-23 02:59:12 UTC
Review of attachment 367274 [details] [review]:

This does fix a couple of potential memleaks! One comment, but I'll fix it myself before pushing.

About the gnome-mouse-* files, they could be turned into final classes too... would be a good 2-hours project (hint hint =) )

::: panels/mouse/cc-mouse-caps-helper.c
@@ +31,3 @@
 {
         Display *display;
+	g_autoptr(GList) devicelist = NULL

Missing ';'
Comment 3 Georges Basile Stavracas Neto 2018-01-23 03:00:33 UTC
Thanks!

Attachment 367274 [details] pushed as d9f0b73 - mouse: Use g_auto for variables