Bugs item #1370197, was opened at 2005-11-30 11:41
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1370197&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: AST
Status: Open
Resolution: None
Priority: 5
Submitted By: Jim Jewett (jimjjewett)
Assigned to: Nobody/Anonymous (nobody)
Summary: memory leak - ast_error_finish

Initial Comment:
http://svn.python.org/view/python/trunk/Python/ast.c?
rev=41486&view=markup

function ast_error_finish

It first gets the errstr, for a possible early out.
If there is an error string, it is increfed, but it is 
not decrefed on the other early outs.  (lineno==-1 and 
failure to build a tmp.


"""
    Py_INCREF(errstr);
    lineno = PyInt_AsLong(PyTuple_GetItem(value, 1));
    if (lineno == -1)
return;
    Py_DECREF(value);

    loc = PyErr_ProgramText(filename, lineno);
    if (!loc) {
Py_INCREF(Py_None);
loc = Py_None;
    }
    tmp = Py_BuildValue("(ziOO)", filename, lineno, 
Py_None, loc);
    Py_DECREF(loc);
    if (!tmp)
return;
    value = Py_BuildValue("(OO)", errstr, tmp);
    Py_DECREF(errstr);
"""




----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1370197&group_id=5470
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to