Fixes a memory error
as reported at:
https://phab.enlightenment.org/D12326
and
https://build.opensuse.org/request/show/945361
thanks goes to Andreas Schwab and Simotek
(cherry picked from commit 4548c5a01b
)
This commit is contained in:
parent
52a462d54c
commit
b91fdb82ba
|
@ -67,7 +67,7 @@ cdef class SmartCbDescription:
|
||||||
|
|
||||||
def __init__(self, name, types):
|
def __init__(self, name, types):
|
||||||
cdef Evas_Smart_Cb_Description *tmp
|
cdef Evas_Smart_Cb_Description *tmp
|
||||||
tmp = <Evas_Smart_Cb_Description *>malloc(sizeof(Evas_Smart_Cb_Description*))
|
tmp = <Evas_Smart_Cb_Description *>malloc(sizeof(Evas_Smart_Cb_Description))
|
||||||
if isinstance(name, unicode): name = PyUnicode_AsUTF8String(name)
|
if isinstance(name, unicode): name = PyUnicode_AsUTF8String(name)
|
||||||
tmp.name = strdup(name)
|
tmp.name = strdup(name)
|
||||||
if isinstance(types, unicode): types = PyUnicode_AsUTF8String(types)
|
if isinstance(types, unicode): types = PyUnicode_AsUTF8String(types)
|
||||||
|
|
Loading…
Reference in New Issue