diff --git a/src/taskstub.js.c b/src/taskstub.js.c index 7dd1cff1..c0996959 100644 --- a/src/taskstub.js.c +++ b/src/taskstub.js.c @@ -333,6 +333,7 @@ static JSValue _taskstub_loadFile(JSContext* context, JSValueConst this_val, int size_t size; tf_serialize_store(tf_task_get(context), stub, &buffer, &size, argv[0]); tf_packetstream_send(stub->_stream, kLoadFile, (char*)buffer, size); + free(buffer); return JS_UNDEFINED; }