Mercurial > cpython-lru_cache-weakref
diff Python/import.c @ 48540:40b0e3318a8b
#3368: free string allocated by "es" ParseTuple format.
| author | Georg Brandl <georg@python.org> |
|---|---|
| date | Sat, 19 Jul 2008 10:13:15 +0000 |
| parents | de0bf60f1245 |
| children | 85b67fb5672b |
line wrap: on
line diff
--- a/Python/import.c Sat Jul 19 09:58:13 2008 +0000 +++ b/Python/import.c Sat Jul 19 10:13:15 2008 +0000 @@ -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)) {
