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.

Author stutzbach
Recipients stutzbach
Date 2010年07月07日.17:52:43
SpamBayes Score 0.015079501
Marked as misclassified No
Message-id <1278525166.4.0.0879298798846.issue9191@psf.upfronthosting.co.za>
In-reply-to
Content
In Reg2Py() in winreg.c, in the REG_MULTI_SZ case, there's the following:
 wchar_t **str = (wchar_t **)malloc(sizeof(wchar_t *)*s);
 if (str == NULL)
 return PyErr_NoMemory();
However, not all of the return paths after that point call free(str).
The leaking paths are pretty unusual, so I'm setting the priority to low. The leaking paths occur when PyList_New returns NULL or if the registry entry contains more than INT_MAX characters.
Two other things I noticed and I'm not sure about:
Is INT_MAX really the maximum number of characters for a Python unicode string?
Should this be using PyMem functions instead of malloc/free?
History
Date User Action Args
2010年07月07日 17:52:46stutzbachsetrecipients: + stutzbach
2010年07月07日 17:52:46stutzbachsetmessageid: <1278525166.4.0.0879298798846.issue9191@psf.upfronthosting.co.za>
2010年07月07日 17:52:44stutzbachlinkissue9191 messages
2010年07月07日 17:52:43stutzbachcreate

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