Properly de-initialize the database engine on delete()
This commit is contained in:
parent
4b51aea95a
commit
7b0ef8d70d
|
@ -61,7 +61,13 @@ Database * database_new(char const * engine, Config * config,
|
|||
void database_delete(Database * database)
|
||||
{
|
||||
if(database->plugin != NULL)
|
||||
{
|
||||
if(database->dplugin != NULL
|
||||
&& database->dplugin->destroy != NULL
|
||||
&& database->database != NULL)
|
||||
database->dplugin->destroy(database->database);
|
||||
plugin_delete(database->plugin);
|
||||
}
|
||||
object_delete(database);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user