From 0f946dc55d15463e451ac9784ab50fffef7ad521 Mon Sep 17 00:00:00 2001 From: Sam Morris <sam@robots.org.uk> Date: Sat, 19 Jun 2010 16:44:24 +0100 Subject: [PATCH 1/4] Fix crash when freeing result of g_udev_client_query_by_subsystem. g_udev_client_query_by_subsystem returns a GList*, not a GSList*. --- gudev.override | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/gudev.override b/gudev.override index 6595da3..b7e51f5 100644 --- a/gudev.override +++ b/gudev.override @@ -7,9 +7,9 @@ headers /* Helper functions from gnome-python (gtksourceview) */ static PyObject * -gslist_to_pylist_objs (const GSList *source) +glist_to_pylist_objs (const GList *source) { - const GSList *iter; + const GList *iter; PyObject *dest = PyList_New (0); for (iter = source; iter != NULL; iter = iter->next) { @@ -144,7 +144,7 @@ _wrap_g_udev_client_query_by_subsystem (PyGObject *self, PyObject *args, PyObjec { static char *kwlist[] = { "subsystem", NULL }; gchar *subsystem = NULL; - GSList *source; + GList *source; PyObject *dest; if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|z:GUdevClient.query_by_subsystem", @@ -152,8 +152,8 @@ _wrap_g_udev_client_query_by_subsystem (PyGObject *self, PyObject *args, PyObjec return NULL; source = g_udev_client_query_by_subsystem(G_UDEV_CLIENT(self->obj), subsystem); - dest = gslist_to_pylist_objs(source); - g_slist_free(source); + dest = glist_to_pylist_objs(source); + g_list_free(source); return dest; } %% -- 1.7.2.2