diff --git a/ChangeLog b/ChangeLog index c122e6afdc..b7052e1465 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-01-05 Alessandro Decina + + patch by: Vincent GENIEUX + + * gst/gststructure.override: + Don't leak key names in _wrap_gst_structure_keys. + 2009-01-02 Edward Hervey * gst/gst-types.defs: diff --git a/gst/gststructure.override b/gst/gststructure.override index 453a216725..fe4e76fd7a 100644 --- a/gst/gststructure.override +++ b/gst/gststructure.override @@ -155,15 +155,13 @@ _wrap_gst_structure_keys (PyObject *self) int i, n; PyObject *ret; - - ret = PyList_New(0); - s = pyg_boxed_get(self, GstStructure); n = gst_structure_n_fields(s); + ret = PyList_New(n); for (i = 0; i < n; ++i) { const gchar *name = gst_structure_nth_field_name (s, i); - PyList_Append(ret, PyString_FromString(name)); + PyList_SetItem(ret, i, PyString_FromString(name)); } return ret;