-/* $OpenBSD: ftpd.c,v 1.69 2000/03/03 15:51:45 bitblt Exp $ */
+/* $OpenBSD: ftpd.c,v 1.70 2000/04/11 11:42:11 deraadt Exp $ */
/* $NetBSD: ftpd.c,v 1.15 1995/06/03 22:46:47 mycroft Exp $ */
/*
logxfer(name, st.st_size, start);
(void) fclose(dout);
data = -1;
- pdata = -1;
done:
+ if (pdata >= 0)
+ (void) close(pdata);
+ pdata = -1;
if (cmd == 0)
LOGBYTES("get", name, byte_count);
(*closefunc)(fin);
transflag = 0;
if (dout != NULL)
(void) fclose(dout);
+ else {
+ if (pdata >= 0)
+ close(pdata);
+ }
data = -1;
pdata = -1;
out: