[New-bugs-announce] [issue32274] Potential leak in pysqlite_connection_init()

Lele Gaifax report at bugs.python.org
Mon Dec 11 04:41:13 EST 2017

New submission from Lele Gaifax <lelegaifax at gmail.com>:

The function calls ``sqlite3_open()`` that, if I understand its documentation correctly[#], returns a new connection object in all cases (that is, even on errors) with the only exception of "out of memory" (in which case it sets the second parameter to ``NULL``).

I think that the new connection object should be immediately released in case of errors, passing it to ``sqlite3_close()``.

.. [#] http://sqlite.org/c3ref/open.html

messages: 308021
nosy: lelit
priority: normal
severity: normal
status: open
title: Potential leak in pysqlite_connection_init()
type: resource usage

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list