Drop zathura_db_free

Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
This commit is contained in:
Sebastian Ramacher 2013-03-14 21:30:01 +01:00
parent b895759e72
commit b5dbe9ff6d
4 changed files with 4 additions and 19 deletions

View file

@ -79,7 +79,7 @@ zathura_sqldatabase_new(const char* path)
zathura_database_t* db = g_object_new(ZATHURA_TYPE_SQLDATABASE, "path", path, NULL);
zathura_sqldatabase_private_t* priv = ZATHURA_SQLDATABASE_GET_PRIVATE(db);
if (priv->session == NULL) {
g_object_unref(db);
g_object_unref(G_OBJECT(db));
return NULL;
}

View file

@ -9,16 +9,6 @@ zathura_database_default_init(ZathuraDatabaseInterface* GIRARA_UNUSED(iface))
{
}
void
zathura_db_free(zathura_database_t* db)
{
if (db == NULL) {
return;
}
g_object_unref(db);
}
bool
zathura_db_add_bookmark(zathura_database_t* db, const char* file,
zathura_bookmark_t* bookmark)

View file

@ -50,13 +50,6 @@ struct _ZathuraDatabaseInterface
GType zathura_database_get_type(void);
/**
* Free database instance.
*
* @param db The database instance to free.
*/
void zathura_db_free(zathura_database_t* db);
/**
* Add or update bookmark in the database.
*

View file

@ -287,7 +287,9 @@ zathura_free(zathura_t* zathura)
girara_list_free(zathura->bookmarks.bookmarks);
/* database */
zathura_db_free(zathura->database);
if (zathura->database != NULL) {
g_object_unref(G_OBJECT(zathura->database));
}
/* free print settings */
if (zathura->print.settings != NULL) {