Hi-
I am currently migrating over from 3.4 to 3.5.2. I am creating a custom
VFS, but it is essentially the same as unix.
As I was going through the code, there was a particular section that made me
think that it may not have been migrated correctly.
In the fillInUnixFile() method (and assuming that
SQLITE_ENABLE_LOCKING_STYLE is defined), my concern is at line 2196:
pNew = sqlite3_malloc( sizeof(unixFile) );
(in context, the surrounding code is:)
pNew->dirfd = -1;
pNew->h = h;
SET_THREADID(pNew);
pNew = sqlite3_malloc( sizeof(unixFile) ); /* <--- This line */
if( pNew==0 ){
close(h);
enterMutex();
releaseLockInfo(pNew->pLock);
releaseOpenCnt(pNew->pOpen);
leaveMutex();
return SQLITE_NOMEM;
}else{
switch(lockingStyle) {
It seems like the allocation will wipe out previous set values and cause a
memory leak. Could someone verify?
Thanks,
Mark
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------