diff options
author | jkh <jkh@FreeBSD.org> | 1998-01-28 04:42:38 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1998-01-28 04:42:38 +0000 |
commit | e62c8eeed612e7824cd8927a88e670fbc08ea8df (patch) | |
tree | 7a053748b8cf0875fc59c49f4852ddfc5028c6fa /usr.sbin/sysinstall/ftp.c | |
parent | 7ce79be939037edae24cef97af10cce1c3320410 (diff) | |
download | FreeBSD-src-e62c8eeed612e7824cd8927a88e670fbc08ea8df.zip FreeBSD-src-e62c8eeed612e7824cd8927a88e670fbc08ea8df.tar.gz |
MF22: only fclose() OpenConn if non-NULL.
Diffstat (limited to 'usr.sbin/sysinstall/ftp.c')
-rw-r--r-- | usr.sbin/sysinstall/ftp.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.sbin/sysinstall/ftp.c b/usr.sbin/sysinstall/ftp.c index 3c91b748..f6d6bc7 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; } |