[Prev][Next][Index][Thread]

# Memory leak in free_program()

- Date: Fri, 12 Jul 1996 17:17:50 PDT
- From:

    There is a memory leak in free_program() in program.c.  It involves FLOAT
    literals not being freed because the code assumes that a literal will only
    need to be freed if it's TYPE_STR.  The lines in question are:

                if (p->literals[i].type == TYPE_STR) /* will not be a LIST */
                    free_str(p->literals[i].v.str);

    The easiest(and best?) fix is to just replace those lines with:

    free_var(p->literals[i]);

    ---
       Brian Buchanan    sysop@calbbs.com    brian@wasteland.calbbs.com
          -= ArchWizard of Farpoint (wasteland.calbbs.com 8888) =-

- Prev: Login Weirdness
- Next: MOO Client / Local Editing
- Index: MOO-cows
- Thread: MOO-cows

Home | Subject Index | Thread Index