mirror of
https://github.com/launchbadge/sqlx.git
synced 2026-01-20 15:46:30 +00:00
sqlite: fix memory leak
This commit is contained in:
parent
9f99a8f3d2
commit
df1b9b06ed
@ -69,6 +69,8 @@ where
|
||||
if r == SQLITE_OK {
|
||||
Ok(())
|
||||
} else {
|
||||
// The xDestroy callback is not called if the sqlite3_create_collation_v2() function fails.
|
||||
drop(unsafe { Box::from_raw(boxed_f) });
|
||||
Err(Error::Database(Box::new(SqliteError::new(handle.as_ptr()))))
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user