Thread View: news.software.nntp
1 messages
1 total messages
Started by Forrest J. Cavalier III
Fri, 22 Aug 1997 00:00
FIX: 1.6b3 memory leak in expireover - expire~1.dif [1/1]
Author: Forrest J. Cavalier III
Date: Fri, 22 Aug 1997 00:00
Date: Fri, 22 Aug 1997 00:00
51 lines
2132 bytes
2132 bytes
--*- Boundary Sn946+gqUW.Dq?'d-VSF
Content-Type: Text/Plain; charset=US-ASCII
INN 1.6b3/expire/expireover has a significant memory leak,
basically it allocates new space to store the headers for
each article processed, and never frees them.
I reported it to inn-workers yesterday, and I confirmed it
in "unit" testing today.
I don't know why code which appeared to work in 1.5.1 was
changed to what is in 1.6b3, but here is the fix for
1.6b3, and probably every 1.6.
(The fix is a bit "wordy" but it should make it safe even
if it is installed in 1.5.1 or 1.5.1sec2 by accident.)
Forrest Cavalier, Mib Software, INN customization and consulting
--*- Boundary Sn946+gqUW.Dq?'d-VSFL
Content-Type: Text/Plain; charset=ISO-8859-1
*** inn-1.6b3\expire\expireover.c.orig Thu Jul 31 08:34:40 1997
--- inn-1.6b3\expire\expireover.c Fri Aug 22 10:25:36 1997
***************
*** 451,456 ****
--- 451,469 ----
Headers = NEW(ARTOVERFIELD, ARTfieldsize);
for (hp = Headers, i = ARTfieldsize; --i >= 0; hp++)
hp->Length = 0;
+ } else {
+ /* This disposes from the previous call. This simplifies
+ handling later on. We trade off this readable code
+ for the problem that nothing DISPOSEs() the last
+ caller's use. mibsoft 8/22/97
+ */
+ for (hp = Headers, i = ARTfieldsize; --i >= 0; hp++) {
+ if (hp->Header) {
+ DISPOSE(hp->Header);
+ hp->Header = 0;
+ }
+ hp->Length = 0;
+ }
}
for (hp = Headers, i = ARTfieldsize; --i >= 0; hp++)
hp->HasHeader = FALSE;
--*- Boundary Sn946+gqUW.Dq?'d-VSF---
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads