Hello again list,
      I've been battling with this memory leak for about 4 days now.  I've
been doing all that I know to do to find it and I am very greatful for the
help you people have given me.  It's restored my faith in the list.  I've
spent about 5 hours in gdb inspecting memory and whatnot when I came accross
this:

Fri Jan  4 20:40:08 2002 :: [EMAIL PROTECTED] has connected.

Breakpoint 1, medit (ch=0x4056edc4, argument=0x4056d176 "test mob")
    at olc.c:2459
2459            free_string(pMob->player_name);
(gdb)
(gdb) inspect pMob->player_name
$1 = 0x40180f40 "test mob"
(gdb) step
free_string (pstr=0x40180f40 "test mob") at db.c:2492
2492        if ( pstr == NULL
(gdb) step
2499    }
(gdb) step
medit (ch=0x4056edc4, argument=0x4056d176 "test mob") at olc.c:2460
2460            pMob->player_name = str_dup(arg2);
(gdb) inspect pMob->player_name
$2 = 0x40180f40 "test mob"
(gdb) inspect arg2
$3 = "test mob\000ected from aca95277.ipt.aol.com at Fri Jan  4 20:40:08
2002\n\
r", '\000' <repeats 3230 times>, ">þ\t@", '\000' <repeats 12 times>,
"[EMAIL PROTECTED]
[EMAIL PROTECTED]
¿\00
0\000\000\000\000\000\000\000gfff\002\000\000\000\000\000\000\000\032.\020\b
\000
\000\000\000àÏ\a@", '\000' <repeats 12 times>, ">þ\t@", '\000' <repeats 12
times
>, "[EMAIL PROTECTED]"...

Now I've spent about 30 minutes starring at free_string() and I can't
determine if free_string(pMob->player_name) is actually freeing the string
in player_name.  Second, what is the deal with the junk in arg2?  Here's
that assignment at the top of the medit function.

strcpy(arg2, argument); <----is this correct in doing???

Once again thank you all very very much for your help.

Arkham


Reply via email to