Set file to NULL after calling fclose().

Fixes Coverity CID 2669.
Ok by lukem@.
This commit is contained in:
peter 2006-03-17 21:26:55 +00:00
parent 243139ee37
commit ee7f54fae4
1 changed files with 3 additions and 2 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: ftpd.c,v 1.173 2006/03/17 21:24:33 peter Exp $ */
/* $NetBSD: ftpd.c,v 1.174 2006/03/17 21:26:55 peter Exp $ */
/*
* Copyright (c) 1997-2004 The NetBSD Foundation, Inc.
@ -105,7 +105,7 @@ __COPYRIGHT(
#if 0
static char sccsid[] = "@(#)ftpd.c 8.5 (Berkeley) 4/28/95";
#else
__RCSID("$NetBSD: ftpd.c,v 1.173 2006/03/17 21:24:33 peter Exp $");
__RCSID("$NetBSD: ftpd.c,v 1.174 2006/03/17 21:26:55 peter Exp $");
#endif
#endif /* not lint */
@ -1980,6 +1980,7 @@ dataconn(const char *name, off_t size, const char *fmode)
break;
conerrno = errno;
(void) fclose(file);
file = NULL;
data = -1;
if (conerrno == EADDRINUSE) {
sleep((unsigned) swaitint);