sh: Fix swapped INTON/INTOFF.
A possible consequence of this bug was a memory leak if SIGINT arrived during a 'set' command (listing variables). MFC after: 1 week
This commit is contained in:
parent
761d31e8bf
commit
33233ec76e
@ -603,7 +603,7 @@ showvarscmd(int argc __unused, char **argv __unused)
|
||||
}
|
||||
}
|
||||
|
||||
INTON;
|
||||
INTOFF;
|
||||
vars = ckmalloc(n * sizeof(*vars));
|
||||
i = 0;
|
||||
for (vpp = vartab; vpp < vartab + VTABSIZE; vpp++) {
|
||||
@ -628,7 +628,7 @@ showvarscmd(int argc __unused, char **argv __unused)
|
||||
out1c('\n');
|
||||
}
|
||||
ckfree(vars);
|
||||
INTOFF;
|
||||
INTON;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user