aboutsummaryrefslogtreecommitdiff
path: root/src/backup.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2013-12-13 16:23:55 +0000
committerdrh <drh@noemail.net>2013-12-13 16:23:55 +0000
commita3cc007df47198f501b2ae02eeafbb64d6ff0097 (patch)
treeb95008fcd4285186924fe464af8c9a11eb73dc24 /src/backup.c
parenta5f40593bee1ae4261725e80b18259e3dfda975d (diff)
downloadsqlite-a3cc007df47198f501b2ae02eeafbb64d6ff0097.tar.gz
sqlite-a3cc007df47198f501b2ae02eeafbb64d6ff0097.zip
Simplication and optimization of error message handling.
FossilOrigin-Name: 9d347f547e7ba9590b0c68edf50a14ad94a2bb92
Diffstat (limited to 'src/backup.c')
-rw-r--r--src/backup.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/backup.c b/src/backup.c
index 292f3f456..4a6bc7493 100644
--- a/src/backup.c
+++ b/src/backup.c
@@ -601,10 +601,10 @@ int sqlite3_backup_finish(sqlite3_backup *p){
/* Set the error code of the destination database handle. */
rc = (p->rc==SQLITE_DONE) ? SQLITE_OK : p->rc;
- sqlite3Error(p->pDestDb, rc, 0);
-
- /* Exit the mutexes and free the backup context structure. */
if( p->pDestDb ){
+ sqlite3Error(p->pDestDb, rc, 0);
+
+ /* Exit the mutexes and free the backup context structure. */
sqlite3LeaveMutexAndCloseZombie(p->pDestDb);
}
sqlite3BtreeLeave(p->pSrc);