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 150145 - [PATCH] fixes a bunch of leaks in the control-center
[PATCH] fixes a bunch of leaks in the control-center
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: [obsolete] settings-daemon
2.6.x
Other Linux
: High major
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2004-08-14 19:57 UTC by Thomas Cataldo
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: 2.8.x
GNOME version: ---


Attachments
2.6 settings daemon leaks (7.17 KB, patch)
2004-08-14 19:57 UTC, Thomas Cataldo
none Details | Review
updated patch integrating Vincent's comments (7.06 KB, patch)
2004-09-05 19:10 UTC, Thomas Cataldo
none Details | Review

Description Thomas Cataldo 2004-08-14 19:57:00 UTC
agains the gnome-2-6 branch. Same patch probably applies to head too.
Comment 1 Thomas Cataldo 2004-08-14 19:57:39 UTC
Created attachment 30544 [details] [review]
2.6 settings daemon leaks
Comment 2 Thomas Cataldo 2004-08-19 08:52:21 UTC
Could someone please review and apply this patch. Having leaks in the longest
running gnome daemon is a pretty bad bug.
Comment 3 Olav Vitters 2004-08-28 19:13:50 UTC
Please review the patch.
Comment 4 Vincent Untz 2004-09-02 08:47:45 UTC
Comment on attachment 30544 [details] [review]
2.6 settings daemon leaks

>-	if (!strcmp (star_app->id, plain_app->id))
>+	}
>+	if (!strcmp (star_app->id, plain_app->id)) {
>+	        if (star_app != NULL) {
>+	            gnome_vfs_mime_application_free (star_app);
>+	        }
>+	        if (plain_app != NULL) {
>+	            gnome_vfs_mime_application_free (plain_app);
>+	        }
> 		return;
>+	}

This should probably just be:

>-	if (!strcmp (star_app->id, plain_app->id))
>+	}
>+	if (!strcmp (star_app->id, plain_app->id)) {
>+		gnome_vfs_mime_application_free (star_app);
>+		gnome_vfs_mime_application_free (plain_app);
> 		return;
>+	}

So, should this patch be applied?
Comment 5 Thomas Cataldo 2004-09-05 19:10:11 UTC
Created attachment 31308 [details] [review]
updated patch integrating Vincent's comments

Vincent's advice integrated in this new version of the patch.
Comment 6 Elijah Newren 2004-09-12 23:46:17 UTC
Punting to 2.8.x
Comment 7 Kjartan Maraas 2004-09-18 10:08:40 UTC
Thomas, did you run things under valgrind or something similar after doing these
changes? Just want to make sure we're not introducing regressions in this area.
We should really get this in ASAP though to have it tested as much as possible
before the first point release.
Comment 8 Thomas Cataldo 2004-09-18 12:52:11 UTC
I used valgrind to locate the problems in the first place by running the
gnome-settings-daemon into an Xnest display.
Comment 9 Kjartan Maraas 2004-09-23 07:19:30 UTC
Can we get this into CVS soon?
Comment 10 Sebastien Bacher 2004-10-21 11:06:00 UTC
this patch is pending for a while, permission to commit to head ?
Comment 11 Jody Goldberg 2004-10-21 16:14:13 UTC
Yah, lets get it in.  The changes look sane.  But there are alot of corner cases
in there.  HEAD only please.
Comment 12 Sebastien Bacher 2004-10-21 19:42:34 UTC
patch commit to HEAD, thanks for your contribution !