From: Dave West Date: Tue, 16 Oct 2007 13:10:20 +0000 (+0000) Subject: Fixed a bug that could cause us to keep a temporary file open. X-Git-Tag: v7.86~2948 X-Git-Url: https://code.citadel.org/?a=commitdiff_plain;h=7df74f2d26cd88e1bdaa38a0066b0e7c5dce2291;p=citadel.git Fixed a bug that could cause us to keep a temporary file open. When moving the network temporary spool file to the permanent spool file, if the fopen of the permanent spool file fails then the temporary spool file was not closed. --- diff --git a/citadel/modules/network/serv_network.c b/citadel/modules/network/serv_network.c index f64d604e5..313127962 100644 --- a/citadel/modules/network/serv_network.c +++ b/citadel/modules/network/serv_network.c @@ -431,8 +431,8 @@ void cmd_snet(char *argbuf) { fprintf(newfp, "%s", buf); } fclose(newfp); - fclose(fp); } + fclose(fp); } end_critical_section(S_NETCONFIGS); unlink(tempfilename); @@ -1746,8 +1746,8 @@ void receive_spool(int sock, char *remote_nodename) { fprintf(newfp, "%s", buf); } fclose(newfp); - fclose(fp); } + fclose(fp); } end_critical_section(S_NETSPOOL); unlink(tempfilename);