From 7336790c8e8bc702555d87a5c7a4328af91bf744 Mon Sep 17 00:00:00 2001 From: Christoph Reiter Date: Fri, 19 Apr 2019 18:48:20 +0200 Subject: pygi-array: fix leak of transfer-full/container C arrays. Fixes #322 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We did not free the array passed to us after marshalling, only the helper garray. Patch by Tomasz Miąsko --- gi/pygi-array.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gi/pygi-array.c b/gi/pygi-array.c index 073e1436..890e7c57 100644 --- a/gi/pygi-array.c +++ b/gi/pygi-array.c @@ -766,7 +766,7 @@ _pygi_marshal_cleanup_to_py_array (PyGIInvokeState *state, return; free_array = TRUE; - free_array_full = FALSE; + free_array_full = arg_cache->transfer != GI_TRANSFER_NOTHING; } else if (array_cache->array_type == GI_ARRAY_TYPE_PTR_ARRAY) { ptr_array_ = (GPtrArray *) data; } else { -- cgit v1.2.1