Skip to content

sqlite leaks on error #47403

Closed
Closed

Description

@Rhamphoryncus
BPO 3153
Nosy @avassalotti

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2008-07-13.22:07:09.458>
created_at = <Date 2008-06-20.21:36:05.638>
labels = ['extension-modules', 'performance']
title = 'sqlite leaks on error'
updated_at = <Date 2008-07-13.22:07:09.390>
user = 'https://bugs.python.org/Rhamphoryncus'

bugs.python.org fields:

activity = <Date 2008-07-13.22:07:09.390>
actor = 'alexandre.vassalotti'
assignee = 'none'
closed = True
closed_date = <Date 2008-07-13.22:07:09.458>
closer = 'alexandre.vassalotti'
components = ['Extension Modules']
creation = <Date 2008-06-20.21:36:05.638>
creator = 'Rhamphoryncus'
dependencies = []
files = []
hgrepos = []
issue_num = 3153
keywords = []
message_count = 2.0
messages = ['68478', '69628']
nosy_count = 2.0
nosy_names = ['Rhamphoryncus', 'alexandre.vassalotti']
pr_nums = []
priority = 'normal'
resolution = 'fixed'
stage = None
status = 'closed'
superseder = None
type = 'resource usage'
url = 'https://bugs.python.org/issue3153'
versions = []

Activity

  1. Rhamphoryncus commented on Jun 20, 2008

    Rhamphoryncusmannequin
    MannequinAuthor

    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.

  2. avassalotti commented on Jul 13, 2008

    @avassalotti
    Member

    Fixed in r64930 (trunk) and r64931 (py3k). Thanks.

  3. transferred this issue fromon Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    extension-modulesC modules in the Modules dirperformancePerformance or resource usage

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions