aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRandi Harper <randi@FreeBSD.org>2010-06-18 21:10:56 +0000
committerRandi Harper <randi@FreeBSD.org>2010-06-18 21:10:56 +0000
commit50a0a767afe753e3e0efebfb0d6c93d25b51b24a (patch)
tree54aa1d4265763cfb38b289bba1a14b3498557f90
parentca2ca0349726a51f8d5c5b397f52dd7e4242b892 (diff)
downloadsrc-50a0a767afe753e3e0efebfb0d6c93d25b51b24a.tar.gz
src-50a0a767afe753e3e0efebfb0d6c93d25b51b24a.zip
MFC r209273:
Fix uninitialized variables that cause a crash when the network is initialized and sysinstall is not running as init. Submitted by: Nick Mills Approved by: cperciva (mentor) Approved by: re (kensmith)
Notes
Notes: svn path=/releng/8.1/; revision=209315
-rw-r--r--usr.sbin/sysinstall/tcpip.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/usr.sbin/sysinstall/tcpip.c b/usr.sbin/sysinstall/tcpip.c
index 1c1d6766cd28..453781532355 100644
--- a/usr.sbin/sysinstall/tcpip.c
+++ b/usr.sbin/sysinstall/tcpip.c
@@ -732,6 +732,9 @@ tcpDeviceSelect(void)
return (NULL);
}
+ devs = deviceFind(NULL, DEVICE_TYPE_NETWORK);
+ cnt = deviceCount(devs);
+
if ((!RunningAsInit) && (variable_check("NETWORK_CONFIGURED=NO") != TRUE)) {
if (!msgYesNo("Running multi-user, assume that the network is already configured?"))
return devs[0];