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

                 Summary: Memleak fix for RPL
                 Project: Warzone Resurrection Project
            Submitted by: None
            Submitted on: Saturday 10/27/2007 at 02:15 CEST
                Category: Campaign
                Severity: 4 - Important
                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:

RE: rpl_reader.c(44) : {22168} normal block at 0x02F0C900, 37528 bytes long.

When it reads in novideo.rpl, sees buffer is too small.
Calls resize_data_buffer().
I don't see it ever being freed again.
Note, it reads in the same file in cut scenes also.

Here is a fix that looks like it works OK. :)

Index: rpl_reader.c
===================================================================
--- rpl_reader.c        (revision 2631)
+++ rpl_reader.c        (working copy)
@@ -387,6 +387,9 @@
        }
 
        PHYSFS_close(rpl->f);
+       free(data_buffer);
+       data_buffer = NULL;
+       data_buffer_size =0;
        free(rpl->chunks);
        free(rpl);
 }





    _______________________________________________________

Reply to this item at:

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

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


_______________________________________________
Warzone-dev mailing list
Warzone-dev@gna.org
https://mail.gna.org/listinfo/warzone-dev

Reply via email to