diff --git a/src/taskstub.js.c b/src/taskstub.js.c index c0d67092..b86055f6 100644 --- a/src/taskstub.js.c +++ b/src/taskstub.js.c @@ -321,6 +321,7 @@ static JSValue _taskstub_setImports(JSContext* context, JSValueConst this_val, i size_t size; tf_serialize_store(tf_task_get(context), stub, &buffer, &size, argv[0]); tf_packetstream_send(stub->_stream, kSetImports, (char*)buffer, size); + free(buffer); return JS_UNDEFINED; } @@ -331,6 +332,7 @@ static JSValue _taskstub_setRequires(JSContext* context, JSValueConst this_val, size_t size; tf_serialize_store(tf_task_get(context), stub, &buffer, &size, argv[0]); tf_packetstream_send(stub->_stream, kSetRequires, (char*)buffer, size); + free(buffer); return JS_UNDEFINED; }