[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
lynx-dev [PATCH][dev20] Patch little memory leak
From: |
John Bley |
Subject: |
lynx-dev [PATCH][dev20] Patch little memory leak |
Date: |
Sun, 21 Mar 1999 17:44:58 -0500 (EST) |
* Fix tiny memory leak in HTAAUtil.c (John Bley)
--
John Bley - address@hidden
Duke '99 - English/Computer Science
Since English is a mess, it maps well onto the problem space,
which is also a mess, which we call reality. - Larry Wall
diff -Burp lynx2-8-2/WWW/Library/Implementation/HTAAUtil.c
lynx2-8-2-patched/WWW/Library/Implementation/HTAAUtil.c
--- lynx2-8-2/WWW/Library/Implementation/HTAAUtil.c Mon Jan 18 07:29:20 1999
+++ lynx2-8-2-patched/WWW/Library/Implementation/HTAAUtil.c Sun Mar 21
17:39:55 1999
@@ -454,6 +454,11 @@ PRIVATE char *start_pointer;
PRIVATE char *end_pointer;
PRIVATE int in_soc = -1;
+PRIVATE void FreeHTAAUtil NOARGS
+{
+ FREE(buffer);
+}
+
/* PUBLIC HTAA_setupReader()
** SET UP HEADER LINE READER, i.e., give
** the already-read-but-not-yet-processed
@@ -491,6 +496,7 @@ PUBLIC void HTAA_setupReader ARGS3(char
(size_t)(sizeof(char)*(buffer_length + 1)));
}
if (buffer == NULL) outofmem(__FILE__, "HTAA_setupReader");
+ atexit(FreeHTAAUtil);
start_pointer = buffer;
if (start_of_headers) {
strncpy(buffer, start_of_headers, length);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- lynx-dev [PATCH][dev20] Patch little memory leak,
John Bley <=