1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-10-25 20:58:26 +03:00

Arrange for ThreadData to be automatically deallocated even if SQLITE_MEMDEBUG is defined. Fix for #1623. (CVS 2965)

FossilOrigin-Name: 9e2e40845d30cc150abe23ee318a721b4fe9613c
This commit is contained in:
danielk1977
2006-01-17 16:10:13 +00:00
parent 08659fee65
commit cbb8496c5e
7 changed files with 41 additions and 21 deletions

View File

@@ -1769,7 +1769,7 @@ ThreadData *sqlite3UnixThreadSpecificData(int allocateFlag){
}
}
}else if( pTsd!=0 && allocateFlag<0
&& memcmp(pTsd, &zeroData, sizeof(zeroData))==0 ){
&& memcmp(pTsd, &zeroData, THREADDATASIZE)==0 ){
sqlite3OsFree(pTsd);
pthread_setspecific(key, 0);
TSD_COUNTER(-1);
@@ -1787,7 +1787,7 @@ ThreadData *sqlite3UnixThreadSpecificData(int allocateFlag){
}
}
}else if( pTsd!=0 && allocateFlag<0
&& memcmp(pTsd, &zeroData, sizeof(zeroData))==0 ){
&& memcmp(pTsd, &zeroData, THREADDATASIZE)==0 ){
sqlite3OsFree(pTsd);
TSD_COUNTER(-1);
pTsd = 0;