]> granicus.if.org Git - python/commitdiff
Fix memory leak. This is (very!) similar to part of SF patch #478006.
authorFred Drake <fdrake@acm.org>
Fri, 9 Nov 2001 15:59:36 +0000 (15:59 +0000)
committerFred Drake <fdrake@acm.org>
Fri, 9 Nov 2001 15:59:36 +0000 (15:59 +0000)
Modules/_hotshot.c

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