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 110757 - [0.6.2] memory corruption fix
[0.6.2] memory corruption fix
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other other
: Normal normal
: 0.6.2
Assigned To: Ronald Bultje
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2003-04-14 13:29 UTC by Joshua N Pritikin
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
fix memory corruption in the registry (1.27 KB, patch)
2003-04-14 13:29 UTC, Joshua N Pritikin
none Details | Review
for review (505 bytes, patch)
2003-05-02 21:29 UTC, Ronald Bultje
none Details | Review

Description Joshua N Pritikin 2003-04-14 13:29:05 UTC
g_list_concat does _not_ copy the lists.  Folk, please read the
documentation before using any library functions.
Comment 1 Joshua N Pritikin 2003-04-14 13:29:54 UTC
Created attachment 15708 [details] [review]
fix memory corruption in the registry
Comment 2 Wim Taymans 2003-04-14 15:39:58 UTC
shoot me, stupid thing. This will be fixed when I commit my rewrite of
registry/registrypool/plugin querying code.
Comment 3 Joshua N Pritikin 2003-04-15 04:06:31 UTC
CVS HEAD appears to be fixed.  i'm not sure whether 0.6.1 needs a fix
for this problem.  Otherwise, close this bug.
Comment 4 Ronald Bultje 2003-04-28 08:53:45 UTC
There's no gstregistrypool.c in 0.6.x. There is a gstregistry.c with
the following code:

GList*
gst_registry_pool_plugin_list (void)
{
  GList *result = NULL;
  GList *walk = _gst_registry_pool;
                                                                     
          
  while (walk) {
    GstRegistry *registry = GST_REGISTRY (walk->data);
                                                                     
          
    /* FIXME only include highest priority plugins */
    result = g_list_concat (result, g_list_copy (registry->plugins));
                                                                     
          
    walk = g_list_next (walk);
  }
                                                                     
          
  return g_list_concat (_gst_registry_pool_plugins, result);
}

I'm assuming I need to use g_list_copy() on _gst_registry_pool_plugins
here too?
Comment 5 Joshua N Pritikin 2003-04-30 06:04:58 UTC
Yes, you need g_list_concat if the GList is supposed to be freed by
the caller (i don't have 0.6.x source code handy so i can't check). 
g_list_concat does _not_ copy the list.
Comment 6 Ronald Bultje 2003-05-02 21:29:30 UTC
Created attachment 16221 [details] [review]
for review
Comment 7 Wim Taymans 2003-05-06 20:58:33 UTC
fixed in 0.6 branch