[gstreamer-bugs] [Bug 522741] Entry returned by gst_index_add_format not owned by caller

GStreamer (bugzilla.gnome.org) bugzilla-daemon at bugzilla.gnome.org
Sun Mar 16 06:32:47 PDT 2008


If you have any questions why you received this email, please see the text at
the end of this email. Replies to this email are NOT read, please see the text
at the end of this email. You can add comments to this bug at:
  http://bugzilla.gnome.org/show_bug.cgi?id=522741

  GStreamer | gstreamer (core) | Ver: HEAD CVS

Tim-Philipp Müller changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |t.i.m at zen.co.uk




------- Comment #2 from Tim-Philipp Müller  2008-03-16 13:32 UTC -------
This seems to have been caused by this commit:

 2008-02-01  Julien Moutte  <julien at fluendo.com>

        * docs/gst/gstreamer-sections.txt: Add GST_CHECK_VERSION to the docs
        * gst/gstindex.c: (gst_index_class_init), (gst_index_free_writer),
        (gst_index_finalize), (gst_index_entry_free),
        (gst_index_add_association): Fix memory leaks.
        * gst/gstversion.h.in: Add GST_CHECK_VERSION macro.
        * plugins/indexers/gstmemindex.c: (gst_mem_index_class_init),
        (gst_mem_index_free_format), (gst_mem_index_free_id),
        (gst_mem_index_finalize): Fix memory leaks.
        * win32/common/config.h: Updated to CVS HEAD.

http://webcvs.freedesktop.org/gstreamer/gstreamer/gst/gstindex.c?r1=1.43&r2=1.44

The problem is the newly-added

 g_free (entry->data.format.key)

in line 555, which frees a string the index entry doesn't own (see line 590):

  const GstFormatDefinition *def;

  def = gst_format_get_details (format);
  entry->data.format.key = def->nick;

(This might theoretically also apply to data.object.key, but since that's not
implemented it's not really an issue).


-- 
See http://bugzilla.gnome.org/page.cgi?id=email.html for more info about why you received
this email, why you can't respond via email, how to stop receiving
emails (or reduce the number you receive), and how to contact someone
if you are having problems with the system.

You can add comments to this bug at http://bugzilla.gnome.org/show_bug.cgi?id=522741.




More information about the Gstreamer-bugs mailing list