diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2021-03-17 12:50:44 +0200 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2021-03-22 12:04:27 +0200 |
commit | b0c7e2738e3d0ca9aacd7e111431a13b25816ed2 (patch) | |
tree | 55ffeb8f8a9cdf8045ca4184ab99dcb2f611aec0 /lib | |
parent | bd924775d2b4f561c36a0ca721a44e443ac898cc (diff) | |
download | rpm-b0c7e2738e3d0ca9aacd7e111431a13b25816ed2.tar.gz |
Fix regression causing access to already closed sqlite handle
Commit fb5888417727edbd8ce1b389b1b6ee9ac899d8e4 introduced a regression
where on database open failure we end up accessing the already freed
handle when trying to report the error.
Backport of commit d601a7b7ae764b31ad74b2dceff1eafb5297147f
Diffstat (limited to 'lib')
-rw-r--r-- | lib/backend/sqlite.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/backend/sqlite.c b/lib/backend/sqlite.c index c86697a97..7c2de45aa 100644 --- a/lib/backend/sqlite.c +++ b/lib/backend/sqlite.c @@ -155,7 +155,7 @@ static int sqlite_init(rpmdb rdb, const char * dbhome) if (xx != SQLITE_OK) { rpmlog(RPMLOG_ERR, _("Unable to open sqlite database %s: %s\n"), - dbfile, sqlite3_errmsg(sdb)); + dbfile, sqlite3_errstr(xx)); rc = 1; goto exit; } |