[Bug 687471] rtsp: fix memory leaks under error conditions

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Sun Nov 4 04:02:00 PST 2012


https://bugzilla.gnome.org/show_bug.cgi?id=687471
  GStreamer | gst-plugins-base | git

--- Comment #3 from Miguel Angel Cabrera Moya <madmac2501 at gmail.com> 2012-11-04 12:01:53 UTC ---
I agree with Tim if a function says it takes ownership of a value should do so
always.

Thinking about this corner case it can be fixed this way. It's a bit ugly but
it works. If you agree I can make a patch with this fix.

#include <glib.h>

void
main()
{
  gchar *x = g_strdup ("eserse");
  g_return_if_fail (NULL != NULL || (
          {
            g_free (x);
            FALSE;
          }
      ));
}

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list