diff options
Diffstat (limited to 'lib/clippy.c')
| -rw-r--r-- | lib/clippy.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/clippy.c b/lib/clippy.c index c655619b71..6223697ae9 100644 --- a/lib/clippy.c +++ b/lib/clippy.c @@ -51,7 +51,7 @@ int main(int argc, char **argv) #if PY_VERSION_HEX >= 0x03040000 /* 3.4 */ Py_SetStandardStreamEncoding("UTF-8", NULL); #endif - char *name = wconv(argv[0]); + wchar_t *name = wconv(argv[0]); Py_SetProgramName(name); PyImport_AppendInittab("_clippy", command_py_init); @@ -68,6 +68,8 @@ int main(int argc, char **argv) fp = fopen(pyfile, "r"); if (!fp) { fprintf(stderr, "%s: %s\n", pyfile, strerror(errno)); + + free(name); return 1; } } else { @@ -86,6 +88,8 @@ int main(int argc, char **argv) if (PyRun_AnyFile(fp, pyfile)) { if (PyErr_Occurred()) PyErr_Print(); + + free(name); return 1; } Py_Finalize(); |
