summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJose Quaresma <quaresma.jose@gmail.com>2020-06-14 16:34:50 +0100
committerJose Quaresma <quaresma.jose@gmail.com>2020-07-10 17:02:24 +0100
commit9a31b01486a267689bb820079206c72e1ec6de53 (patch)
tree2cd047fa5dd971890f8c0d18ea45e70d7e057c40
parent4c3ffc78b7a7c3d2680fcf773ad6bf2b7d4320d4 (diff)
overrides: fix memory leak in pyg_boxed_new
pyg_boxed_new cause a memory leak if it hold a copy of the boxed wrapper and freed when the wrapper is deallocated. use the boxed wrapper value itself and don't hold a copy of the value.
-rw-r--r--gi/overrides/gstmodule.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gi/overrides/gstmodule.c b/gi/overrides/gstmodule.c
index ef2eb45..0fc7bfe 100644
--- a/gi/overrides/gstmodule.c
+++ b/gi/overrides/gstmodule.c
@@ -736,7 +736,7 @@ _remap (GstMapInfo * mapinfo, PyObject * py_mapinfo)
PyMemoryView_FromMemory ((char *) mapinfo->data, mapinfo->size, flags);
/* Box GstMemory into a Gst.Memory */
- py_memory = pyg_boxed_new (_gst_memory_type, mapinfo->memory, TRUE, TRUE);
+ py_memory = pyg_boxed_new (_gst_memory_type, mapinfo->memory, FALSE, FALSE);
/* Fill out Gst.MapInfo with values corresponding to GstMapInfo */
if (PyObject_SetAttrString (py_mapinfo, "memory", py_memory) == -1)
return NULL;