ash: [VAR] Fix poplocalvar on abnormal exit from function
authorDenys Vlasenko <vda.linux@googlemail.com>
Wed, 26 Jul 2017 17:55:31 +0000 (19:55 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Wed, 26 Jul 2017 18:33:51 +0000 (20:33 +0200)
commit484fc2056df8a82acabc70386eeb6d0da4982fec
tree6fb274f54567084fde08d667e7d6183f2971e85f
parent981a0568b3f3003cd1a2640ade61d8f5ebdfb865
ash: [VAR] Fix poplocalvar on abnormal exit from function

Upstream commit:

    Date: Thu, 27 May 2010 11:32:55 +0800
    [VAR] Fix poplocalvar on abnormal exit from function

    The new localvar code broke the abnormal exit from functions
    and built-ins by not restoring the original localvar state.

    This patch fixes this by storing the previous localvar state so
    that we always unwind correctly in case of an abnormal exit.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
shell/ash.c