From: Michael Schroeder Date: Fri, 12 Apr 2013 11:36:05 +0000 (+0200) Subject: fix error handling in rpm_byrpmdbid X-Git-Tag: BASE-SuSE-Code-12_3-Branch~52 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1555ef2e3cbd20043254c3ae865ff3b737aade7d;p=thirdparty%2Flibsolv.git fix error handling in rpm_byrpmdbid --- diff --git a/ext/repo_rpmdb.c b/ext/repo_rpmdb.c index 01b6cb2a..20b3715d 100644 --- a/ext/repo_rpmdb.c +++ b/ext/repo_rpmdb.c @@ -2471,7 +2471,7 @@ rpm_byrpmdbid(void *rpmstate, Id rpmdbid) DBT dbdata; RpmHead *rpmhead; - if (!state->dbopened && !openpkgdb(state, state->rootdir)) + if (state->dbopened != 1 && !openpkgdb(state, state->rootdir)) return 0; rpmdbid2db(buf, rpmdbid, state->byteswapped); memset(&dbkey, 0, sizeof(dbkey));