homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: sqlite leaks on error
Type: resource usage Stage:
Components: Extension Modules Versions:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: Rhamphoryncus, alexandre.vassalotti
Priority: normal Keywords:

Created on 2008年06月20日 21:36 by Rhamphoryncus, last changed 2022年04月11日 14:56 by admin. This issue is now closed.

Messages (2)
msg68478 - (view) Author: Adam Olsen (Rhamphoryncus) Date: 2008年06月20日 21:36
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.
msg69628 - (view) Author: Alexandre Vassalotti (alexandre.vassalotti) * (Python committer) Date: 2008年07月13日 22:07
Fixed in r64930 (trunk) and r64931 (py3k). Thanks.
History
Date User Action Args
2022年04月11日 14:56:35adminsetgithub: 47403
2008年07月13日 22:07:09alexandre.vassalottisetstatus: open -> closed
resolution: fixed
messages: + msg69628
nosy: + alexandre.vassalotti
2008年06月20日 21:36:05Rhamphoryncuscreate

AltStyle によって変換されたページ (->オリジナル) /