[Rpm-maint] [rpm-software-management/rpm] Fix a minor memory leak on failed sqlite database open (RhBug:1896301) (#1430)

Panu Matilainen notifications at github.com
Tue Nov 10 10:57:34 UTC 2020

Curiously, sqlite allocates resources that need freeing even in case
of failure to open. Quoting from https://www.sqlite.org/c3ref/open.html:

> Whether or not an error occurs when it is opened, resources associated
> with the database connection handle should be released by passing it to
> sqlite3_close() when it is no longer required.

I disagree, but as it's documented behavior there's no point filing a
bug. So lets close the non-open connection and chug on.
You can view, comment on, or merge this pull request online at:


-- Commit Summary --

  * Fix a minor memory leak on failed sqlite database open (RhBug:1896301)

-- File Changes --

    M lib/backend/sqlite.c (2)

-- Patch Links --


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20201110/d75b5949/attachment.html>

More information about the Rpm-maint mailing list