forked from cory/tildefriends
Fixed loads of memory leaks and related issues.
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3782 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
@ -270,6 +270,8 @@ static bool _serialize_storeInternal(tf_task_t* task, tf_taskstub_t* to, buffer_
|
||||
if (JS_GetOwnProperty(tf_task_get_context(task), &desc, value, ptab[i].atom) == 1)
|
||||
{
|
||||
key_value = desc.value;
|
||||
JS_FreeValue(tf_task_get_context(task), desc.setter);
|
||||
JS_FreeValue(tf_task_get_context(task), desc.getter);
|
||||
}
|
||||
_serialize_storeInternal(task, to, buffer, key, depth + 1);
|
||||
_serialize_storeInternal(task, to, buffer, key_value, depth + 1);
|
||||
@ -297,6 +299,8 @@ static bool _serialize_storeInternal(tf_task_t* task, tf_taskstub_t* to, buffer_
|
||||
if (JS_GetOwnProperty(tf_task_get_context(task), &desc, value, ptab[i].atom) == 1)
|
||||
{
|
||||
key_value = desc.value;
|
||||
JS_FreeValue(tf_task_get_context(task), desc.setter);
|
||||
JS_FreeValue(tf_task_get_context(task), desc.getter);
|
||||
}
|
||||
_serialize_storeInternal(task, to, buffer, key, depth + 1);
|
||||
_serialize_storeInternal(task, to, buffer, key_value, depth + 1);
|
||||
@ -325,7 +329,7 @@ static JSValue _serialize_load(tf_task_t* task, tf_taskstub_t* from, const char*
|
||||
|
||||
static JSValue _serialize_loadInternal(tf_task_t* task, tf_taskstub_t* from, const char** buffer, size_t* size, int depth)
|
||||
{
|
||||
if (*size < sizeof(size))
|
||||
if (*size < sizeof(int32_t))
|
||||
{
|
||||
return JS_UNDEFINED;
|
||||
}
|
||||
|
Reference in New Issue
Block a user