From d2dfb0db5f563ba8082ae9cf007814486d8a8c1f Mon Sep 17 00:00:00 2001 From: Jonathan Matthew Date: Wed, 8 Apr 2009 21:54:42 +0000 Subject: Bug 575781 – pyg_notify_free needs to ensure it has GIL before calling MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 2009-04-09 Jonathan Matthew Bug 575781 – pyg_notify_free needs to ensure it has GIL before calling Py_XDECREF * gio/gio.override: Ensure we're holding the GIL before potentially destroying the callback and data. svn path=/trunk/; revision=1057 --- ChangeLog | 8 ++++++++ gio/gio.override | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/ChangeLog b/ChangeLog index 1c9e7b6..444b3a7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2009-04-09 Jonathan Matthew + + Bug 575781 – pyg_notify_free needs to ensure it has GIL before calling + Py_XDECREF + + * gio/gio.override: Ensure we're holding the GIL before potentially + destroying the callback and data. + 2009-04-05 Gian Mario Tagliaretti * gio/gfile.override: diff --git a/gio/gio.override b/gio/gio.override index 300e0c7..5170624 100644 --- a/gio/gio.override +++ b/gio/gio.override @@ -145,8 +145,12 @@ pygio_notify_free(PyGIONotify *notify) { if (notify) { if (notify->referenced) { + PyGILState_STATE state; + + state = pyg_gil_state_ensure(); Py_XDECREF(notify->callback); Py_XDECREF(notify->data); + pyg_gil_state_release(state); } if (notify->buffer) -- cgit