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;