changeset 868:d889a20dd9b5 trunk

[svn] - fix double delete[] possibility.
author nenolod
date Fri, 16 Mar 2007 18:58:17 -0700
parents d9c7b1d413c9
children 48ebfc711a8c
files ChangeLog src/adplug/core/u6m.cxx src/adplug/core/u6m.h
diffstat 3 files changed, 10 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Fri Mar 16 18:58:10 2007 -0700
+++ b/ChangeLog	Fri Mar 16 18:58:17 2007 -0700
@@ -1,3 +1,10 @@
+2007-03-17 01:58:10 +0000  Giacomo Lozito <james@develia.org>
+  revision [1834]
+  - last commit wasn't obviously related wit changes here; revert stuff that is still being tested
+  trunk/src/ffmpeg/libavformat/utils.c |    2 +-
+  1 file changed, 1 insertion(+), 1 deletion(-)
+
+
 2007-03-17 01:47:24 +0000  Giacomo Lozito <james@develia.org>
   revision [1832]
   - prevent skin list overlap when it's first populated and user quickly switchs to other tabs in the prefswin
--- a/src/adplug/core/u6m.cxx	Fri Mar 16 18:58:10 2007 -0700
+++ b/src/adplug/core/u6m.cxx	Fri Mar 16 18:58:17 2007 -0700
@@ -83,8 +83,8 @@
 	
     if (!lzw_decompress(source,destination))
     {
-        delete[] compressed_song_data;
-        delete[] song_data;
+        delete[] compressed_song_data; compressed_song_data = 0;
+        delete[] song_data; song_data = 0;
         return(false);
     }
 
--- a/src/adplug/core/u6m.h	Fri Mar 16 18:58:10 2007 -0700
+++ b/src/adplug/core/u6m.h	Fri Mar 16 18:58:17 2007 -0700
@@ -39,7 +39,7 @@
 
 	~Cu6mPlayer()
     {
-        if(song_data) delete[] song_data;
+        if(song_data) { delete[] song_data; song_data = 0; }
     };
 
 	bool load(VFSFile *fd, const CFileProvider &fp);