aboutsummaryrefslogtreecommitdiff
path: root/sqlite3.go
diff options
context:
space:
mode:
authorJoe Shaw <jshaw@fastly.com>2016-10-27 16:44:56 -0700
committerJoe Shaw <jshaw@fastly.com>2016-10-27 16:44:56 -0700
commitbdab31cc98cdf61a93567c55e85e835ba6fb364f (patch)
tree0fb90e79837e067eaec23b243a9c58b15294271e /sqlite3.go
parentMerge pull request #333 from nyarly/master (diff)
downloadgolite-bdab31cc98cdf61a93567c55e85e835ba6fb364f.tar.gz
golite-bdab31cc98cdf61a93567c55e85e835ba6fb364f.tar.xz
fix double free in SQLiteBackup.Close() on error
The sqlite3_backup_finish() function never fails, it just returns the error code from previous operations. Previously if it returned an error, the finalizer wouldn't be unset and sqlite3_backup_finish() would be run again on an already-finished backup. This results in a double-free and often segfaults. The error handling is described in more detail in the "Error handling" section of https://www.sqlite.org/backup.html.
Diffstat (limited to 'sqlite3.go')
0 files changed, 0 insertions, 0 deletions