[Patches] [ python-Patches-1499797 ] Fix for memory leak in WindowsError_str

SourceForge.net noreply at sourceforge.net
Sun Jun 4 08:20:12 CEST 2006


Patches item #1499797, was opened at 2006-06-02 13:46
Message generated for change (Settings changed) made by nnorwitz
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1499797&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: Core (C code)
Group: Python 2.5
>Status: Closed
>Resolution: Accepted
Priority: 5
Submitted By: Žiga Seilnacht (zseil)
>Assigned to: Neal Norwitz (nnorwitz)
Summary: Fix for memory leak in WindowsError_str

Initial Comment:
The same memory leak that Neal Norwitz found in
EnvironmentError_str is also present in
WindowsError_str.

How to reproduce:

Python 2.5a2 (trunk:46603M, Jun  2 2006, 22:37:47)
  ...
>>> e = WindowsError(1, 'message', 'filename')
[27062 refs]
>>> s = str(e)
[27065 refs]
>>> s = str(e)
[27066 refs]
>>> s = str(e)
[27067 refs]
>>> del e.filename
[27066 refs]
>>> s = str(e)
[27066 refs]
>>> s = str(e)
[27066 refs]
>>> s = str(e)
[27066 refs]

This simple patch fixes it.

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

>Comment By: Neal Norwitz (nnorwitz)
Date: 2006-06-03 23:20

Message:
Logged In: YES 
user_id=33168

Thanks!

Committed revision 46639.


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

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


More information about the Patches mailing list