1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-29 08:01:23 +03:00

If the "fake_big_file" command fails, be sure to close the file before

returning. (CVS 801)

FossilOrigin-Name: fa1b5e2119617b111c6b463bbf641ddcb9972cae
This commit is contained in:
drh
2002-12-17 14:19:49 +00:00
parent f33cb428e5
commit f1337bb5ff
3 changed files with 9 additions and 9 deletions

View File

@ -13,7 +13,7 @@
** is not included in the SQLite library. It is used for automated
** testing of the SQLite library.
**
** $Id: test2.c,v 1.13 2002/12/02 04:25:21 drh Exp $
** $Id: test2.c,v 1.14 2002/12/17 14:19:49 drh Exp $
*/
#include "os.h"
#include "sqliteInt.h"
@ -512,11 +512,11 @@ static int fake_big_file(
return TCL_ERROR;
}
rc = sqliteOsWrite(&fd, "Hello, World!", 14);
sqliteOsClose(&fd);
if( rc ){
Tcl_AppendResult(interp, "write failed: ", errorName(rc), 0);
return TCL_ERROR;
}
sqliteOsClose(&fd);
return TCL_OK;
}