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

Fix a memory leak following failure to open an external CSV file in the

csv.c extension.

FossilOrigin-Name: 526ee07d19dbc8fd1af3a02a8da12b337020a4be40e045da9a19d0a7c2b6ab54
This commit is contained in:
drh
2018-04-24 10:57:10 +00:00
parent 8349c11d02
commit 4d3e61403a
4 changed files with 16 additions and 8 deletions

View File

@ -132,6 +132,7 @@ static int csv_reader_open(
}
p->in = fopen(zFilename, "rb");
if( p->in==0 ){
sqlite3_free(p->zIn);
csv_reader_reset(p);
csv_errmsg(p, "cannot open '%s' for reading", zFilename);
return 1;