trivial: Set sqlite handle to NULL when open fails

This may fix a possible use after free.
This commit is contained in:
Kalev Lember 2016-06-14 11:14:10 +02:00
parent 168d180d9b
commit 6f951c1265

View File

@ -862,6 +862,7 @@ pk_transaction_db_load (PkTransactionDb *tdb, GError **error)
"Can't open transaction database: %s",
sqlite3_errmsg (tdb->priv->db));
sqlite3_close (tdb->priv->db);
tdb->priv->db = NULL;
return FALSE;
}