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 710104 - Fix a few issues with get_runtime_state / set_runtime_state
Fix a few issues with get_runtime_state / set_runtime_state
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2013-10-14 13:49 UTC by Jasper St. Pierre (not reading bugmail)
Modified: 2013-10-14 14:53 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
shell-global: Fix a few memory leaks (916 bytes, patch)
2013-10-14 13:49 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review
shell-global: Fix an invalid memory botch-up (979 bytes, patch)
2013-10-14 13:49 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review

Description Jasper St. Pierre (not reading bugmail) 2013-10-14 13:49:51 UTC
Fix a few memory leaks, and a double free.
Comment 1 Jasper St. Pierre (not reading bugmail) 2013-10-14 13:49:55 UTC
Created attachment 257256 [details] [review]
shell-global: Fix a few memory leaks
Comment 2 Jasper St. Pierre (not reading bugmail) 2013-10-14 13:49:58 UTC
Created attachment 257257 [details] [review]
shell-global: Fix an invalid memory botch-up

The value we return is a floating ref, which gjs shouldn't
try to free.
Comment 3 Rui Matos 2013-10-14 14:01:02 UTC
Review of attachment 257256 [details] [review]:

++
Comment 4 Rui Matos 2013-10-14 14:12:20 UTC
Review of attachment 257257 [details] [review]:

::: src/shell-global.c
@@ +1793,3 @@
  * logout or reboot.
  *
+ * Returns: (transfer floating): The value of a serialized property, or %NULL if none stored

The GVariant APIs use 'transfer none'. Should they be changed?
Comment 5 Jasper St. Pierre (not reading bugmail) 2013-10-14 14:27:53 UTC
One's an alias for the other. See https://wiki.gnome.org/GObjectIntrospection/Annotations#Memory_and_lifecycle_management
Comment 6 Rui Matos 2013-10-14 14:50:15 UTC
Review of attachment 257257 [details] [review]:

OK, looks fine
Comment 7 Jasper St. Pierre (not reading bugmail) 2013-10-14 14:53:28 UTC
Attachment 257256 [details] pushed as 4548859 - shell-global: Fix a few memory leaks
Attachment 257257 [details] pushed as d21ae1d - shell-global: Fix an invalid memory botch-up