Commit d2bb507a authored by Edward Hervey's avatar Edward Hervey 🤘

gst/gstmessage.override: Fix for memleak

Original commit message from CVS:
* gst/gstmessage.override:
Fix for memleak
parent f90d5579
2005-12-07 Edward Hervey <edward@fluendo.com>
* gst/gstmessage.override:
Fix for memleak
=== release 0.10.0 ===
2005-12-05 <thomas (at) apestaart (dot) org>
......
......@@ -125,7 +125,7 @@ static PyObject *
_wrap_gst_message_parse_error (PyGstMiniObject *self)
{
PyObject *ret;
GError *error;
GError *error = NULL;
gchar *debug;
if (GST_MESSAGE_TYPE(self->obj) != GST_MESSAGE_ERROR) {
......@@ -137,13 +137,15 @@ _wrap_gst_message_parse_error (PyGstMiniObject *self)
ret = PyList_New(2);
PyList_SetItem(ret, 0, pyg_boxed_new (GST_TYPE_G_ERROR, error, TRUE, TRUE));
if (error)
g_error_free (error);
if (debug != NULL) {
PyList_SetItem(ret, 1, PyString_FromString(debug));
} else {
Py_INCREF (Py_None);
PyList_SetItem(ret, 1, Py_None);
}
g_free(debug);
return ret;
}
%%
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment