trivial: Set sqlite handle to NULL when open fails
This may fix a possible use after free.
This commit is contained in:
parent
168d180d9b
commit
6f951c1265
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user