(reported by Thomas Heller). If have_unicode_filename is set,
path looks like it will not be used, so there's no need to free it.
static PyObject *
posix_utime(PyObject *self, PyObject *args)
{
- char *path;
+ char *path = NULL;
long atime, mtime, ausec, musec;
int res;
PyObject* arg;
}
if (res < 0) {
#ifdef Py_WIN_WIDE_FILENAMES
- if (have_unicode_filename) {
- PyMem_Free(path);
+ if (have_unicode_filename)
return posix_error_with_unicode_filename(wpath);
- }
#endif /* Py_WIN_WIDE_FILENAMES */
return posix_error_with_allocated_filename(path);
}