[Bug 660357] [gst-python] Fix decref of null pointer

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Thu Oct 20 05:14:46 PDT 2011


https://bugzilla.gnome.org/show_bug.cgi?id=660357
  GStreamer | gst-python | git

--- Comment #1 from Tim-Philipp Müller <t.i.m at zen.co.uk> 2011-10-20 12:14:43 UTC ---
(From update of attachment 197661)
>@@ -1395,7 +1395,8 @@ pad_block_callback_marshal(GstPad *pad, gboolean blocked, gpointer user_data)
>     }
> 
>     ret = PyObject_CallObject(callback, args);
>-    Py_DECREF(args);
>+    if (args != NULL)
>+        Py_DECREF(args);
> 
>     if (!ret)
>         PyErr_Print();

It obviously "can't hurt", but I wonder this: if args is NULL there, doesn't
that mean that PySequence_Concat has failed? (Assuming PyObject_CallObject  is
not some kind of weird macro that can mess with 'args') and if
PySequence_Concat failed for some reason, should we still be doing the
PyObject_CallObject in the first place with NULL args instead of erroring out?

-- 
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