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
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=231001
@ -603,7 +603,7 @@ showvarscmd(int argc __unused, char **argv __unused)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
INTON;
|
INTOFF;
|
||||||
vars = ckmalloc(n * sizeof(*vars));
|
vars = ckmalloc(n * sizeof(*vars));
|
||||||
i = 0;
|
i = 0;
|
||||||
for (vpp = vartab; vpp < vartab + VTABSIZE; vpp++) {
|
for (vpp = vartab; vpp < vartab + VTABSIZE; vpp++) {
|
||||||
@ -628,7 +628,7 @@ showvarscmd(int argc __unused, char **argv __unused)
|
|||||||
out1c('\n');
|
out1c('\n');
|
||||||
}
|
}
|
||||||
ckfree(vars);
|
ckfree(vars);
|
||||||
INTOFF;
|
INTON;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user