commit | cda5c068a460c29dab3a24abcfcc55a200ce77b3 | [log] [tgz] |
---|---|---|
author | Neal Norwitz <nnorwitz@gmail.com> | Sun Aug 12 17:09:36 2007 +0000 |
committer | Neal Norwitz <nnorwitz@gmail.com> | Sun Aug 12 17:09:36 2007 +0000 |
tree | 5d8c9f199aca5d48d7af10bcd89d50fd71abc0aa | |
parent | fca70054c5704535f38dd780821bb1482c01eb1e [diff] |
Fix memory leak in an error condition
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index 000f6a2..d81674b 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c
@@ -4293,7 +4293,10 @@ Py_FileSystemDefaultEncoding, &path)) return NULL; v = PySequence_GetItem(args, 0); - if (v == NULL) return NULL; + if (v == NULL) { + PyMem_Free(path); + return NULL; + } if (PyUnicode_Check(v)) { arg_is_unicode = 1;