[issue3153] sqlite leaks on error
Adam Olsen
report at bugs.python.org
Fri Jun 20 23:36:06 CEST 2008
New submission from Adam Olsen <rhamph at gmail.com>:
Found in Modules/_sqlite/cursor.c:
self->statement = PyObject_New(pysqlite_Statement,
&pysqlite_StatementTy
pe);
if (!self->statement) {
goto error;
}
rc = pysqlite_statement_create(self->statement,
self->connection, operation);
if (rc != SQLITE_OK) {
self->statement = 0;
goto error;
}
Besides the ugliness of allocating the object before passing it to the
"create" function, if pysqlite_statement_create fails, the object is leaked.
----------
components: Extension Modules
messages: 68478
nosy: Rhamphoryncus
severity: normal
status: open
title: sqlite leaks on error
type: resource usage
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue3153>
_______________________________________
More information about the Python-bugs-list
mailing list