summaryrefslogtreecommitdiffstats
path: root/rpminfo.c
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2020-03-11 09:33:14 +0100
committerRemi Collet <remi@remirepo.net>2020-03-11 09:33:14 +0100
commit9bae085b0ed5779eb1daeca8f8eb4e77a32aeab6 (patch)
tree99e96d961a9f6161ebe6877abe6c99520fcc89a8 /rpminfo.c
parent69ca15d17f7479b08448fc73c4505370882eff26 (diff)
close open DB
Diffstat (limited to 'rpminfo.c')
-rw-r--r--rpminfo.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/rpminfo.c b/rpminfo.c
index 987b62a..1a005cb 100644
--- a/rpminfo.c
+++ b/rpminfo.c
@@ -268,6 +268,7 @@ PHP_FUNCTION(rpmdbinfo)
db = rpmtsGetRdb(ts);
di = rpmdbInitIterator(db, RPMTAG_NAME, name, len);
if (!di) {
+ rpmtsCloseDB(ts);
RETURN_FALSE;
}
@@ -277,6 +278,8 @@ PHP_FUNCTION(rpmdbinfo)
rpm_header_to_zval(&tmp, h, full);
add_next_index_zval(return_value, &tmp);
}
+
+ rpmtsCloseDB(ts);
}
/* }}} */