1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-07 02:42:48 +03:00

Fix an obscure memory leak that can follow an IO error. (CVS 5956)

FossilOrigin-Name: 8271229c66c72c344ad7afb901b88d9cdaaa6f43
This commit is contained in:
danielk1977
2008-11-26 07:40:30 +00:00
parent 0cd1bbd0b8
commit 36e20936f6
4 changed files with 35 additions and 10 deletions

View File

@@ -9,7 +9,7 @@
** May you share freely, never taking more than you give.
**
*************************************************************************
** $Id: btree.c,v 1.541 2008/11/26 07:25:52 danielk1977 Exp $
** $Id: btree.c,v 1.542 2008/11/26 07:40:30 danielk1977 Exp $
**
** This file implements a external (disk-based) database using BTrees.
** See the header comment on "btreeInt.h" for additional information.
@@ -2927,6 +2927,7 @@ void sqlite3BtreeGetTempCursor(BtCursor *pCur, BtCursor *pTempCur){
for(i=0; i<=pTempCur->iPage; i++){
sqlite3PagerRef(pTempCur->apPage[i]->pDbPage);
}
assert( pTempCur->pKey==0 );
}
/*
@@ -2939,6 +2940,7 @@ void sqlite3BtreeReleaseTempCursor(BtCursor *pCur){
for(i=0; i<=pCur->iPage; i++){
sqlite3PagerUnref(pCur->apPage[i]->pDbPage);
}
sqlite3_free(pCur->pKey);
}
/*