mirror of
https://github.com/launchbadge/sqlx.git
synced 2025-09-30 14:32:23 +00:00
sqlite: fix memory leak
This commit is contained in:
parent
d7c447a9c6
commit
4c1cf86380
@ -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