fix(python): free allocated string pointers (#393)

* fix(python): free allocated string pointers

* Update python/src/deltachat/cutil.py

Co-Authored-By: holger krekel  <holger@merlinux.eu>

* Update cutil.py

* probably the proper way to handle ffi.strings
This commit is contained in:
Friedel Ziegelmayer
2019-08-18 12:45:38 +02:00
committed by holger krekel
parent 6b2fe03d08
commit 8c10aa287c
3 changed files with 7 additions and 6 deletions

View File

@@ -16,4 +16,4 @@ def iter_array(dc_array_t, constructor):
def from_dc_charpointer(obj):
return ffi.string(obj).decode("utf8")
return ffi.string(ffi.gc(obj, lib.dc_str_unref)).decode("utf8")