var: Fix unexporting of local variables using unset
commit1c8cf3e96d3ff221dbcf3f8447fd197cdca18939
authorHerbert Xu <herbert@gondor.apana.org.au>
Thu, 11 Apr 2024 07:43:52 +0000 (11 15:43 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 12 Apr 2024 08:06:02 +0000 (12 16:06 +0800)
tree76d7c785f6a4eb7b7fa8758e1146c585b889c0d7
parent865f44f3fdbc97e21dd279cba46376984cb1e059
var: Fix unexporting of local variables using unset

Local variables and other variables with the flag VSTRFIXED set
could not be unexported using the unset command.  Fix this by
adding a special case in setvareq for them.

Reported-by: Christoph Anton Mitterer <calestyo@scientia.org>
Fixes: e3c9a7dd7097 ("[VAR] Move unsetvar functionality into setvareq")
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
src/var.c