commit be93b6ac80f366d400abe7aaffb1e53d231cae32
parent 5c437a2649d0a18e0a4c944d4f2986bbe3bd6705
Author: Florian Dold <florian@dold.me>
Date: Tue, 17 Jun 2025 00:35:18 +0200
fix #10107: call of js_free on uninitialized pointer
Diffstat:
1 file changed, 0 insertions(+), 2 deletions(-)
diff --git a/quickjs/quickjs-libc.c b/quickjs/quickjs-libc.c
@@ -4447,7 +4447,6 @@ js_os_post_message_from_host(JSContext *ctx, const char *msg_str)
JSThreadState *ts = JS_GetRuntimeOpaque(JS_GetRuntime(ctx));
JSHostMessage *msg;
JSHostMessagePipe *hp;
- uint8_t *data;
msg = malloc(sizeof (*msg));
if (!msg) {
@@ -4480,7 +4479,6 @@ js_os_post_message_from_host(JSContext *ctx, const char *msg_str)
free(msg->msg_data);
free(msg);
}
- js_free(ctx, data);
return -1;
}