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 117305 - gnome_score_get_notable() setting return values
gnome_score_get_notable() setting return values
Status: RESOLVED FIXED
Product: libgnome
Classification: Deprecated
Component: general
HEAD
Other Linux
: High normal
: ---
Assigned To: libgnome maintainer
libgnome maintainer
Depends on:
Blocks:
 
 
Reported: 2003-07-13 06:50 UTC by Steve Chaplin
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch to do as suggested by reporter (419 bytes, patch)
2004-03-26 18:30 UTC, Kjartan Maraas
none Details | Review

Description Steve Chaplin 2003-07-13 06:50:41 UTC
In gnome-score.c, the function gnome_score_get_notable()

I think the section
     {
	*names = NULL;
	*scores = NULL;
	retval = 0;
     }

should be changed to
     {
	*names = NULL;
	*scores = NULL;
	*scoretimes = NULL;
	retval = 0;
     }
	
to set the return value 'scoretimes' to NULL, the same as for 'names' and
'scores'.
Then the function calling gnome_score_get_notable() can safely do:
    g_strfreev (names);
    g_free (scores);
    g_free (scoretimes);
without the risk of 'scoretimes' having an undefined value.
Comment 1 Kjartan Maraas 2003-07-27 15:47:18 UTC
Adding patch keyword as this is as close as it gets to a patch. Upping
pri as well. This should probably be commited to the branch too?
Comment 2 Christian Fredrik Kalager Schaller 2004-01-03 16:49:05 UTC
Reopening and resolving bug as a duplicate as we will be using the
other bug to get the real patch using GStreamer directly.

*** This bug has been marked as a duplicate of 94615 ***
Comment 3 Christian Fredrik Kalager Schaller 2004-01-04 10:29:42 UTC
Mistakenly marked this as a duplicate. Not sure how I managed to do
that, but I did. Thanks to Steve Chaplin for making me aware of my
mistake.
Comment 4 Kjartan Maraas 2004-03-26 18:30:37 UTC
Created attachment 25986 [details] [review]
patch to do as suggested by reporter
Comment 5 Anders Carlsson 2004-05-02 10:07:00 UTC
Although this might be considered a minor API breakage, I've gone ahead and
committed it to HEAD anyway. Thanks!