georg.brandl
2008-07-19 10:13:16 UTC
Author: georg.brandl
Date: Sat Jul 19 12:13:15 2008
New Revision: 65132
Log:
#3368: free string allocated by "es" ParseTuple format.
Modified:
python/branches/py3k/Python/import.c
Modified: python/branches/py3k/Python/import.c
==============================================================================
--- python/branches/py3k/Python/import.c (original)
+++ python/branches/py3k/Python/import.c Sat Jul 19 12:13:15 2008
@@ -3187,6 +3187,7 @@
pathlen = strlen(path);
if (pathlen == 0) {
+ PyMem_Free(path);
PyErr_SetString(PyExc_ImportError, "empty pathname");
return -1;
} else {
@@ -3208,6 +3209,7 @@
rv = stat(mangled, &statbuf);
}
#endif
+ PyMem_Free(path);
if (rv == 0) {
/* it exists */
if (S_ISDIR(statbuf.st_mode)) {
Date: Sat Jul 19 12:13:15 2008
New Revision: 65132
Log:
#3368: free string allocated by "es" ParseTuple format.
Modified:
python/branches/py3k/Python/import.c
Modified: python/branches/py3k/Python/import.c
==============================================================================
--- python/branches/py3k/Python/import.c (original)
+++ python/branches/py3k/Python/import.c Sat Jul 19 12:13:15 2008
@@ -3187,6 +3187,7 @@
pathlen = strlen(path);
if (pathlen == 0) {
+ PyMem_Free(path);
PyErr_SetString(PyExc_ImportError, "empty pathname");
return -1;
} else {
@@ -3208,6 +3209,7 @@
rv = stat(mangled, &statbuf);
}
#endif
+ PyMem_Free(path);
if (rv == 0) {
/* it exists */
if (S_ISDIR(statbuf.st_mode)) {