foralex / picoc

Automatically exported from code.google.com/p/picoc
0 stars 0 forks source link

IncludeCleanup crash #109

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
in the file include.c function IncludeCleanup(). The pointer IncludeLibList is 
not set to NULL at the end of the function.
Then If you execute several script and call the cleanup function after each 
call you get a crash.

i sugest to replace this function by 

void IncludeCleanup()
{
    struct IncludeLibrary *ThisInclude = IncludeLibList;
    struct IncludeLibrary *NextInclude;

    while (ThisInclude != NULL)
    {
        NextInclude = ThisInclude->NextLib;
        HeapFreeMem(ThisInclude);
        ThisInclude = NextInclude;
    }
    IncludeLibList=NULL; /*My change*/
}

Original issue reported on code.google.com by olivier....@smardtv.com on 19 Aug 2010 at 2:43

GoogleCodeExporter commented 8 years ago
This issue was closed by revision r482.

Original comment by zik.sale...@gmail.com on 21 Aug 2010 at 6:07