1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-14 00:22:38 +03:00

Fix memory allocation in proxy locking so that it works with SQLITE_MEMDEBUG.

FossilOrigin-Name: f854cbe06355dd3455b8af4ad6366949c412434e
This commit is contained in:
drh
2010-08-11 06:14:15 +00:00
parent 216eaab282
commit d56b121d10
3 changed files with 11 additions and 11 deletions

View File

@@ -5979,7 +5979,7 @@ static int proxyTransformUnixFile(unixFile *pFile, const char *path) {
pCtx->conchFile->pMethod->xClose((sqlite3_file *)pCtx->conchFile);
sqlite3_free(pCtx->conchFile);
}
sqlite3_free(pCtx->lockProxyPath);
sqlite3DbFree(0, pCtx->lockProxyPath);
sqlite3_free(pCtx->conchFilePath);
sqlite3_free(pCtx);
}
@@ -6170,9 +6170,9 @@ static int proxyClose(sqlite3_file *id) {
if( rc ) return rc;
sqlite3_free(conchFile);
}
sqlite3_free(pCtx->lockProxyPath);
sqlite3DbFree(0, pCtx->lockProxyPath);
sqlite3_free(pCtx->conchFilePath);
sqlite3_free(pCtx->dbPath);
sqlite3DbFree(0, pCtx->dbPath);
/* restore the original locking context and pMethod then close it */
pFile->lockingContext = pCtx->oldLockingContext;
pFile->pMethod = pCtx->pOldMethod;