Use a custom allocator for everything.
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3892 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
#include "ssb.export.h"
|
||||
|
||||
#include "mem.h"
|
||||
#include "ssb.db.h"
|
||||
#include "ssb.h"
|
||||
|
||||
@ -87,7 +88,7 @@ void tf_ssb_export(tf_ssb_t* ssb, const char* key)
|
||||
_write_file(file_path, blob, size);
|
||||
JSContext* context = tf_ssb_get_context(ssb);
|
||||
JSValue app = JS_ParseJSON(context, (const char*)blob, size, NULL);
|
||||
free(blob);
|
||||
tf_free(blob);
|
||||
|
||||
JSValue files = JS_GetPropertyStr(context, app, "files");
|
||||
JSPropertyEnum* ptab = NULL;
|
||||
@ -109,7 +110,7 @@ void tf_ssb_export(tf_ssb_t* ssb, const char* key)
|
||||
{
|
||||
snprintf(file_path, sizeof(file_path), "apps/%s/%s/%s", user, path, file_name);
|
||||
_write_file(file_path, file_blob, file_size);
|
||||
free(file_blob);
|
||||
tf_free(file_blob);
|
||||
}
|
||||
|
||||
JS_FreeCString(context, file_name);
|
||||
|
Reference in New Issue
Block a user