Re: Memory leaks

From: Michael Buselli (mhbusell@midway.uchicago.edu)
Date: 02/26/96


On Mon, 26 Feb 1996, Romulus.. Imp of Phoenix Mud wrote:

> Does anyone know of any memory leaks that are present in the circle
> 2.2 code base? We have been building on this base for over a year
> now on a Sunos Os, we just moved to a linux os the other day and a huge
> leak has reared its ugly head. I don't think I introduced any, but
> then again I am not the worlds greatest coder. If anyone has any memory leak
> fixes for circle's code base in general please email  um to me. 
> 
> Thanks... 

     The do_set() function in act.wizard.c has a memory leak when you 
"set file player something value" if the field you set does a direct 
return from the middle of the switch statment because then the temporary 
char_data struct that was allocated is not freed.  I did something to the 
effect of this in my circle 3.0 code:

#define RETURN { if (is_file) free_char(cbuf); return; }

And that'll fix that problem.  If there are other leaks, good luck 
finding them because they could be anywhere.

Michael Buselli
mhb@uchicago.edu



This archive was generated by hypermail 2b30 : 12/07/00 PST