From: Fabrice Bellard Date: Thu, 14 May 2026 13:51:22 +0000 (+0200) Subject: fixed error handling in os.exec() (#503) X-Git-Url: http://git.kaiwu.me/postgresql/log/contrib/postgres_fdw/static/gitweb.js?a=commitdiff_plain;h=b1b4733bd9f75509ffbf1243b754a8e61278b790;p=quickjs.git fixed error handling in os.exec() (#503) --- diff --git a/quickjs-libc.c b/quickjs-libc.c index 99ba96f..84f990d 100644 --- a/quickjs-libc.c +++ b/quickjs-libc.c @@ -3309,7 +3309,7 @@ static JSValue js_os_exec(JSContext *ctx, JSValueConst this_val, for(i = 0; i < exec_argc; i++) JS_FreeCString(ctx, exec_argv[i]); js_free(ctx, exec_argv); - if (envp != environ) { + if (envp && envp != environ) { char **p; p = envp; while (*p != NULL) {