Well depends what is somestruct_data.best_ratio.name and did you allocate
memory to it? like using str_dup? Cause if you didn't you wouldn't have a
problem. Cause fread_word doesn't allocate memory (don't quote me).

----- Original Message -----
From: "Jeremy Hill" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Thursday, August 29, 2002 8:44 PM
Subject: Question about leaking memory


> void read (void)
> {
>    char *tmp;
>    tmp = fread_word (fp);
>    strcpy (somestruct_data.best_ratio.name, tmp);
>    return;
> }
>
>
> Does this leak memory?
>
>
> --
> ROM mailing list
> [email protected]
> http://www.rom.org/cgi-bin/mailman/listinfo/rom
>


Reply via email to