mirror of
https://github.com/bellard/quickjs.git
synced 2026-05-27 19:09:36 +00:00
fixed error handling in os.exec() (#503)
This commit is contained in:
parent
c1ba371eda
commit
b1b4733bd9
@ -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) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user