diff options
author | Simon Feltman <sfeltman@src.gnome.org> | 2013-10-05 17:00:54 -0700 |
---|---|---|
committer | Simon Feltman <sfeltman@src.gnome.org> | 2013-10-07 17:59:22 -0700 |
commit | 4623caa71c54958ab821db27a9eff2790acb3975 (patch) | |
tree | ef54e4bbebe5184f7abd9139335f5a0630caebec /gi/pygi-cache.h | |
parent | 549f849ef8854352483657df3d7558688a4b0007 (diff) | |
download | pygobject-4623caa71c54958ab821db27a9eff2790acb3975.tar.gz |
Fix GValue array marshaling leaks and crash fallout
* Decrement references for results of PySequence_GetItem. There were a few
places we were not decrementing the Python reference, leaking the value.
* Add tracking of Python arguments with recursive marshaling cleanup. This
allows arrays of GValues which have been coerced from Python types to be
properly free'd (also fixes bug 703662).
* Use g_variant_ref for variant arguments marked as transfer everything.
This fixes double free's caused by the decrementing of PySequence_GetItem
results.
https://bugzilla.gnome.org/show_bug.cgi?id=693402
Diffstat (limited to 'gi/pygi-cache.h')
-rw-r--r-- | gi/pygi-cache.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gi/pygi-cache.h b/gi/pygi-cache.h index 65e2de5d..24a84060 100644 --- a/gi/pygi-cache.h +++ b/gi/pygi-cache.h @@ -45,6 +45,7 @@ typedef PyObject *(*PyGIMarshalToPyFunc) (PyGIInvokeState *state, typedef void (*PyGIMarshalCleanupFunc) (PyGIInvokeState *state, PyGIArgCache *arg_cache, + PyObject *py_arg, /* always NULL for to_py cleanup */ gpointer data, gboolean was_processed); |