diff options
author | Christoph Reiter <reiter.christoph@gmail.com> | 2018-04-13 19:50:00 +0200 |
---|---|---|
committer | Christoph Reiter <reiter.christoph@gmail.com> | 2018-04-13 19:50:00 +0200 |
commit | 80b8d459303bf763873681d3a27fda4a1288d4b5 (patch) | |
tree | 920ce33c389d026b5df276796a546fb84c6925f9 /gi/pygi-array.c | |
parent | c745866df9e4394c6615e79779fff1221a84953a (diff) | |
download | pygobject-80b8d459303bf763873681d3a27fda4a1288d4b5.tar.gz |
pygi-array: fix a leak
We allocate the cleanup data even if there is no cleanup callback registered
in the item cache.
Diffstat (limited to 'gi/pygi-array.c')
-rw-r--r-- | gi/pygi-array.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gi/pygi-array.c b/gi/pygi-array.c index 3c30626a..a0634dcc 100644 --- a/gi/pygi-array.c +++ b/gi/pygi-array.c @@ -789,9 +789,11 @@ _pygi_marshal_cleanup_to_py_array (PyGIInvokeState *state, (array_ != NULL) ? g_array_index (array_, gpointer, i) : g_ptr_array_index (ptr_array_, i), was_processed); } - g_ptr_array_unref (item_cleanups); } + if (cleanup_data) + g_ptr_array_unref ((GPtrArray *) cleanup_data); + if (free_array) { if (array_ != NULL) g_array_free (array_, free_array_full); |