1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-07 02:42:48 +03:00

In sqlite3_bind_pointer(), invoke the destructor if the bind index is

out of range, like sqlite3_bind_blob() does.

FossilOrigin-Name: d6684d2a744e6e04b8796c3b5ecb81c6577728b698c1ab5f4a828b2ac114b8a2
This commit is contained in:
drh
2017-07-27 16:42:36 +00:00
parent a0024e6c99
commit 34fcf36d62
3 changed files with 9 additions and 7 deletions

View File

@@ -1417,6 +1417,8 @@ int sqlite3_bind_pointer(
if( rc==SQLITE_OK ){
sqlite3VdbeMemSetPointer(&p->aVar[i-1], pPtr, zPTtype, xDestructor);
sqlite3_mutex_leave(p->db->mutex);
}else if( xDestructor ){
xDestructor(pPtr);
}
return rc;
}