[Patches] [ python-Patches-654974 ] fix unchecked return values in structseq

noreply@sourceforge.net noreply@sourceforge.net
Tue, 17 Dec 2002 16:50:37 -0800


Patches item #654974, was opened at 2002-12-16 21:17
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=654974&group_id=5470

Category: Core (C code)
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Neal Norwitz (nnorwitz)
Assigned to: Nobody/Anonymous (nobody)
Summary: fix unchecked return values in structseq

Initial Comment:
There are several unchecked return values from
PyMem_*(), etc.  This patch provides checks for those
conditions.  It also changes a PyInt_FromLong(1) to
Py_True.

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

>Comment By: Neal Norwitz (nnorwitz)
Date: 2002-12-17 19:50

Message:
Logged In: YES 
user_id=33168

2nd chunk, not deallocating tup & dict:  I have no idea why
that was in the patch, I have removed it.

On releasing tp_members:  That was an attempt to fix 613222.
 I believe it helped reduce a memory leak.  However, it
should not be part of this patch.

I have uploaded (or tried to) a new file.  There are the two
NULL checks and the change to use Py_True.

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

Comment By: Martin v. Löwis (loewis)
Date: 2002-12-17 18:44

Message:
Logged In: YES 
user_id=21627

On the second chunk: Why are you not deallocating tup and
dict if the buildvalue failed?

On releasing tp_members: Why is this necessary? It seems
safe to assert that these fields are always NULL.

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

Comment By: Neal Norwitz (nnorwitz)
Date: 2002-12-17 08:15

Message:
Logged In: YES 
user_id=33168

Sorry about that, I had all kinds of problems yesterday
attaching.

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

Comment By: Michael Hudson (mwh)
Date: 2002-12-17 07:43

Message:
Logged In: YES 
user_id=6656

SF has won this round, I'm afraid.

Try to attach again?

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

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=654974&group_id=5470