<p>Curiously, sqlite allocates resources that need freeing even in case<br>
of failure to open. Quoting from <a rel="nofollow" href="https://www.sqlite.org/c3ref/open.html">https://www.sqlite.org/c3ref/open.html</a>:</p>
<blockquote>
<p>Whether or not an error occurs when it is opened, resources associated<br>
with the database connection handle should be released by passing it to<br>
sqlite3_close() when it is no longer required.</p>
</blockquote>
<p>I disagree, but as it's documented behavior there's no point filing a<br>
bug. So lets close the non-open connection and chug on.</p>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>  <a href='https://github.com/rpm-software-management/rpm/pull/1430'>https://github.com/rpm-software-management/rpm/pull/1430</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>Fix a minor memory leak on failed sqlite database open (RhBug:1896301)</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/rpm-software-management/rpm/pull/1430/files#diff-fe435dee0d247c1f860c1fe1c57dc87d512ca16c3a6267c925dc25ad3bcf6cad">lib/backend/sqlite.c</a>
    (2)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/rpm-software-management/rpm/pull/1430.patch'>https://github.com/rpm-software-management/rpm/pull/1430.patch</a></li>
  <li><a href='https://github.com/rpm-software-management/rpm/pull/1430.diff'>https://github.com/rpm-software-management/rpm/pull/1430.diff</a></li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/rpm-software-management/rpm/pull/1430">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ADLPZU75NLE4ETMP52GVXOLSPEMB5ANCNFSM4TQQFOYA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/ADLPZUZNVAHD54MKAEVSVOTSPEMB5A5CNFSM4TQQFOYKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4LAYRKVQ.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/rpm-software-management/rpm/pull/1430",
"url": "https://github.com/rpm-software-management/rpm/pull/1430",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>