Fix memory leak. This is (very!) similar to part of SF patch #478006.

This commit is contained in:
Fred Drake 2001-11-09 15:59:36 +00:00
parent 03f96bd8f5
commit f12a68ccd0
1 changed files with 1 additions and 0 deletions

View File

@ -1444,6 +1444,7 @@ write_header(ProfilerObject *self)
(self->linetimings ? "yes" : "no")); (self->linetimings ? "yes" : "no"));
pack_add_info(self, "platform", Py_GetPlatform()); pack_add_info(self, "platform", Py_GetPlatform());
pack_add_info(self, "executable", Py_GetProgramFullPath()); pack_add_info(self, "executable", Py_GetProgramFullPath());
free(buffer);
buffer = (char *) Py_GetVersion(); buffer = (char *) Py_GetVersion();
if (buffer == NULL) if (buffer == NULL)
PyErr_Clear(); PyErr_Clear();