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 352252 - leaks in libbackground
leaks in libbackground
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: Background
git master
Other Linux
: Normal normal
: ---
Assigned To: Rodney Dawes
Control-Center Maintainers
: 352279 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2006-08-21 12:39 UTC by Kjartan Maraas
Modified: 2006-08-23 05:38 UTC
See Also:
GNOME target: ---
GNOME version: 2.15/2.16


Attachments
patch for leaks (2.11 KB, patch)
2006-08-21 12:39 UTC, Kjartan Maraas
none Details | Review
updated patch (2.12 KB, patch)
2006-08-21 12:47 UTC, Kjartan Maraas
none Details | Review
updated patch (3.52 KB, patch)
2006-08-22 14:34 UTC, Kjartan Maraas
accepted-commit_now Details | Review

Description Kjartan Maraas 2006-08-21 12:39:16 UTC
Found a couple of these.
Comment 1 Kjartan Maraas 2006-08-21 12:39:47 UTC
Created attachment 71298 [details] [review]
patch for leaks
Comment 2 Kjartan Maraas 2006-08-21 12:47:04 UTC
Created attachment 71299 [details] [review]
updated patch

This one actually compiles...
Comment 3 Kjartan Maraas 2006-08-21 12:59:31 UTC
Commited.
Comment 4 Rodney Dawes 2006-08-21 14:59:28 UTC
What's the point of filing a bug if you're just going to commit the patch anyway, and not give the maintainer time to even look at it? :)
Comment 5 Alexander Larsson 2006-08-21 17:53:42 UTC
fcrozat saw some double free crashes from libbackground in todays nautilus release. Might be related to this.
Comment 6 Rodney Dawes 2006-08-21 18:15:53 UTC
I've reverted this patch for now. Leaking a couple K is better than crashing. Although, looking at the patch, I don't see why it would crash exactly. Anyway, I'm reopening this.
Comment 7 Rodney Dawes 2006-08-21 18:17:06 UTC
*** Bug 352279 has been marked as a duplicate of this bug. ***
Comment 8 Rodney Dawes 2006-08-21 18:22:24 UTC
Yeah. There wasn't actually a leak here. The gconf string value was being freed by the method it is being passed to, and Kjartan's patch introduced a double free case. The code does need to be cleaned up though.
Comment 9 Kjartan Maraas 2006-08-22 08:02:11 UTC
Sorry for causing problems here. I didn't check whether the other function freed the strings. I agree that the code needs cleaning up though :-)
Comment 10 Kjartan Maraas 2006-08-22 14:34:20 UTC
Created attachment 71368 [details] [review]
updated patch

I made the read_orientation_from_string() and read_wptype_from_string() behave like read_color_from_string() and adjusted all callers. I think this should work, but I haven't tested it yet
Comment 11 Rodrigo Moya 2006-08-22 14:59:00 UTC
This one looks good to me, please make double sure it works correctly before committing.
Comment 12 Kjartan Maraas 2006-08-23 05:38:23 UTC
Compiled both control-center and nautilus with this and it works. Tried logging in, changing backgrounds etc with no problems. Commited.