1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-30 19:03:16 +03:00

Fix a file descriptor leak following malloc failure on DROP TABLE IF EXISTS. (CVS 3296)

FossilOrigin-Name: 6a63f76c8de977b628c4cab258be5a11d7d7def9
This commit is contained in:
drh
2006-06-26 12:50:09 +00:00
parent a2e48b24c7
commit 344a627661
5 changed files with 170 additions and 11 deletions

View File

@ -14,7 +14,7 @@
# special feature is used to see what happens in the library if a malloc
# were to really fail due to an out-of-memory situation.
#
# $Id: malloc.test,v 1.32 2006/04/10 13:37:47 drh Exp $
# $Id: malloc.test,v 1.33 2006/06/26 12:50:09 drh Exp $
set testdir [file dirname $argv0]
source $testdir/tester.tcl
@ -130,6 +130,7 @@ do_malloc_test 1 -tclprep {
error "out of memory"
}
} -sqlbody {
DROP TABLE IF EXISTS t1;
CREATE TABLE t1(
a int, b float, c double, d text, e varchar(20),
primary key(a,b,c)
@ -546,5 +547,6 @@ do_test malloc-99.X {
set sqlite_open_file_count
} {0}
puts open-file-count=$sqlite_open_file_count
sqlite_malloc_fail 0
finish_test