mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-14 19:35:39 +00:00
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.
This commit is contained in:
parent
4c3ffc78b7
commit
9a31b01486
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue