URL:
  <http://gna.org/bugs/?10190>

                 Summary: Fix for some massive memory leaks & other issues
                 Project: Warzone Resurrection Project
            Submitted by: None
            Submitted on: Tuesday 10/23/2007 at 22:41 CEST
                Category: None
                Severity: 5 - Blocker
                Priority: 5 - Normal
                  Status: None
             Assigned to: None
        Originator Email: [EMAIL PROTECTED]
             Open/Closed: Open
         Discussion Lock: Any
                 Release: svn/trunk
        Operating System: Microsoft Windows
         Planned Release: None

    _______________________________________________________

Details:

Note, that tagfile.c needs to be added to the MSVC project file, and in line
1007 in multibot.c:
        STATIC_ASSERT(sizeof(id) == sizeof(pD->id));
breaks MSVC compiles.  I just commented it out for now.

For memleaks:
Seems all *.lex.c files are leaking!

audp_lexer.lex.c(1731) : {15671} normal block at 0x02A7C2E0, 16386 bytes
long.
resource_lexer.lex.c(1706) : {3525} normal block at 0x02A75268, 16386 bytes
long.
level_lexer.lex.c(1818) : {1997} normal block at 0x02A40068, 16386 bytes
long.
script_lexer.lex.c(2800) : {269325} normal block at 0x02E862E8, 16386 bytes
long.
Many others also.
I think these are generated by bison/flex, so I don't know how to debug
these?


Whoever added the line 349 in frameresource.c:
        psRes->aID = malloc(strlen(DebugName) + 1);

Never freed it!

So here is patch to fix.
===================================================================
Index: frameresource.c
===================================================================
--- frameresource.c     (revision 2598)
+++ frameresource.c     (working copy)
@@ -729,7 +729,7 @@
                        {
                                psT->release(psRes->pData);
                        }
-
+                       free(psRes->aID);       //was never freed before
                        psNRes = psRes->psNext;
                        free(psRes);
                }
@@ -767,7 +767,7 @@
                                {
                                        ASSERT( FALSE,"resReleaseAllData: NULL 
release function" );
                                }
-
+                               free(psRes->aID);       //was never freed before
                                psNRes = psRes->psNext;
                                free(psRes);




    _______________________________________________________

Reply to this item at:

  <http://gna.org/bugs/?10190>

_______________________________________________
  Message sent via/by Gna!
  http://gna.org/


_______________________________________________
Warzone-dev mailing list
[email protected]
https://mail.gna.org/listinfo/warzone-dev

Reply via email to