pseudo: fix memory leak and missed privilege drop
qemu.bbclass adds PSEUDO_UNLOAD=1 in qemu_run_binary to avoid reference to
pseudo functions that may not exist in the target environment. This patch
detects the addition of that variable within the environment to which the
call applies, even if not present in the parent environment.
As a side effect it fixes a memory leak.
[YOCTO #4843]
(From OE-Core rev:
9ea32ef507c914f906b3dcc0bb29813a4e0dacba)
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>