aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJordan K. Hubbard <jkh@FreeBSD.org>1998-01-28 04:42:38 +0000
committerJordan K. Hubbard <jkh@FreeBSD.org>1998-01-28 04:42:38 +0000
commit0fc319ac446994458be33e4ab71724b6772b88ea (patch)
tree84c55044cb89fcd14be4433b65a5f821572d485b
parent0c5b292c5b1d5d1bebb8152c27c871a01fd753c0 (diff)
Notes
-rw-r--r--release/sysinstall/ftp.c8
-rw-r--r--usr.sbin/sysinstall/ftp.c8
2 files changed, 10 insertions, 6 deletions
diff --git a/release/sysinstall/ftp.c b/release/sysinstall/ftp.c
index 3c91b7484b8c2..f6d6bc7fd8a26 100644
--- a/release/sysinstall/ftp.c
+++ b/release/sysinstall/ftp.c
@@ -4,7 +4,7 @@
* This is probably the last attempt in the `sysinstall' line, the next
* generation being slated to essentially a complete rewrite.
*
- * $Id: ftp.c,v 1.33 1997/10/03 03:32:03 jkh Exp $
+ * $Id: ftp.c,v 1.34 1997/10/03 14:00:09 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -207,8 +207,10 @@ mediaGetFTP(Device *dev, char *file, Boolean probe)
dev->shutdown(dev);
if (!dev->init(dev)) {
netDown(dev);
- fclose(OpenConn);
- OpenConn = NULL;
+ if (OpenConn) {
+ fclose(OpenConn);
+ OpenConn = NULL;
+ }
variable_unset(VAR_FTP_PATH);
return NULL;
}
diff --git a/usr.sbin/sysinstall/ftp.c b/usr.sbin/sysinstall/ftp.c
index 3c91b7484b8c2..f6d6bc7fd8a26 100644
--- a/usr.sbin/sysinstall/ftp.c
+++ b/usr.sbin/sysinstall/ftp.c
@@ -4,7 +4,7 @@
* This is probably the last attempt in the `sysinstall' line, the next
* generation being slated to essentially a complete rewrite.
*
- * $Id: ftp.c,v 1.33 1997/10/03 03:32:03 jkh Exp $
+ * $Id: ftp.c,v 1.34 1997/10/03 14:00:09 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -207,8 +207,10 @@ mediaGetFTP(Device *dev, char *file, Boolean probe)
dev->shutdown(dev);
if (!dev->init(dev)) {
netDown(dev);
- fclose(OpenConn);
- OpenConn = NULL;
+ if (OpenConn) {
+ fclose(OpenConn);
+ OpenConn = NULL;
+ }
variable_unset(VAR_FTP_PATH);
return NULL;
}