Commit 87ae561f authored by Guillaume Seguin's avatar Guillaume Seguin

Add memory leak warning

parent 8feb30b2
...@@ -198,6 +198,8 @@ cdef class GLine: ...@@ -198,6 +198,8 @@ cdef class GLine:
if has_var(self._status, pos_raw): return self._raw if has_var(self._status, pos_raw): return self._raw
else: return None else: return None
def __set__(self, value): def __set__(self, value):
# WARNING: memory leak could happen here, as we don't do the following :
# if self._raw != NULL: free(self._raw)
self._raw = copy_string(value) self._raw = copy_string(value)
self._status = set_has_var(self._status, pos_raw) self._status = set_has_var(self._status, pos_raw)
property command: property command:
...@@ -205,5 +207,7 @@ cdef class GLine: ...@@ -205,5 +207,7 @@ cdef class GLine:
if has_var(self._status, pos_command): return self._command if has_var(self._status, pos_command): return self._command
else: return None else: return None
def __set__(self, value): def __set__(self, value):
# WARNING: memory leak could happen here, as we don't do the following :
# if self._command != NULL: free(self._command)
self._command = copy_string(value) self._command = copy_string(value)
self._status = set_has_var(self._status, pos_command) self._status = set_has_var(self._status, pos_command)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment