diff options
| -rw-r--r-- | release/sysinstall/ftp.c | 8 | ||||
| -rw-r--r-- | usr.sbin/sysinstall/ftp.c | 8 |
2 files changed, 10 insertions, 6 deletions
diff --git a/release/sysinstall/ftp.c b/release/sysinstall/ftp.c index 3c91b7484b8c..f6d6bc7fd8a2 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 3c91b7484b8c..f6d6bc7fd8a2 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; } |
