Fossil SCM

In the Win32 server code, prevent fclose() from being called on an already closed FILE.

mistachkin 2017-12-28 17:16 trunk
Commit 8d60cd571922d0f90b7b0b5fd3c155eba0d3e21dd99d6381452b8c8589b01a15
1 file changed +1
--- src/winhttp.c
+++ src/winhttp.c
@@ -199,10 +199,11 @@
199199
}
200200
out = fossil_fopen(zCmdFName, "wb");
201201
if( out==0 ) goto end_request;
202202
fwrite(zCmd, 1, strlen(zCmd), out);
203203
fclose(out);
204
+ out = 0;
204205
205206
sqlite3_snprintf(sizeof(zCmd), zCmd, "\"%s\" http -args \"%s\" --nossl%s",
206207
g.nameOfExe, zCmdFName, p->zOptions
207208
);
208209
fossil_system(zCmd);
209210
--- src/winhttp.c
+++ src/winhttp.c
@@ -199,10 +199,11 @@
199 }
200 out = fossil_fopen(zCmdFName, "wb");
201 if( out==0 ) goto end_request;
202 fwrite(zCmd, 1, strlen(zCmd), out);
203 fclose(out);
 
204
205 sqlite3_snprintf(sizeof(zCmd), zCmd, "\"%s\" http -args \"%s\" --nossl%s",
206 g.nameOfExe, zCmdFName, p->zOptions
207 );
208 fossil_system(zCmd);
209
--- src/winhttp.c
+++ src/winhttp.c
@@ -199,10 +199,11 @@
199 }
200 out = fossil_fopen(zCmdFName, "wb");
201 if( out==0 ) goto end_request;
202 fwrite(zCmd, 1, strlen(zCmd), out);
203 fclose(out);
204 out = 0;
205
206 sqlite3_snprintf(sizeof(zCmd), zCmd, "\"%s\" http -args \"%s\" --nossl%s",
207 g.nameOfExe, zCmdFName, p->zOptions
208 );
209 fossil_system(zCmd);
210

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button