aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Somers <asomers@FreeBSD.org>2022-05-28 19:17:37 +0000
committerAlan Somers <asomers@FreeBSD.org>2022-05-28 19:17:37 +0000
commit77d678b7a4075a056be621b46be50377f08bfc9e (patch)
tree2b0d3d3a653f957c08e39bd57ec8e5b19a708eae
parentd46174cd8838b86b9fe956b80c82bd238c302b2e (diff)
downloadsrc-77d678b7a4075a056be621b46be50377f08bfc9e.tar.gz
src-77d678b7a4075a056be621b46be50377f08bfc9e.zip
Fix a memory leak from caf73e58579
Don't shadow an already-local variable with another local declaration. Reported by: dteske MFC after: 13 days MFC with: caf73e58579343fc1661f43554b30115bb940535 Sponsored by: Axcient Differential Revision: https://reviews.freebsd.org/D35331
-rwxr-xr-xusr.sbin/bsdinstall/scripts/zfsboot3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/bsdinstall/scripts/zfsboot b/usr.sbin/bsdinstall/scripts/zfsboot
index 40973f737761..dc9d35feaa78 100755
--- a/usr.sbin/bsdinstall/scripts/zfsboot
+++ b/usr.sbin/bsdinstall/scripts/zfsboot
@@ -667,7 +667,8 @@ dialog_menu_layout()
for disk in $ZFSBOOT_DISKS; do
debug= f_device_find -1 \
$disk $DEVICE_TYPE_DISK disk
- local _${disk}_status
+ f_isset _${disk}_status ||
+ local _${disk}_status
setvar _${disk}_status on
done