diff --git a/tests/server/tftpd.c b/tests/server/tftpd.c index 4215bfe4aaad7f..395558cbdffc8a 100644 --- a/tests/server/tftpd.c +++ b/tests/server/tftpd.c @@ -1304,6 +1304,10 @@ static void recvtftp(struct testcase *test, struct formats *pf) } } while(size == SEGSIZE); write_behind(test, pf->f_convert); + if(test->ofile > 0) { + close(test->ofile); + test->ofile = 0; + } rap->th_opcode = htons((unsigned short)opcode_ACK); /* send the "final" ack */