Mercurial > otakunoraifu
diff scn2k/scn2k_grp.cc @ 8:55b577e5f5b5
Some memory leaks fixed
author | thib |
---|---|
date | Tue, 05 Aug 2008 12:56:51 +0000 |
parents | aa0577c1a494 |
children | dac3a35aeff6 |
line wrap: on
line diff
--- a/scn2k/scn2k_grp.cc +++ b/scn2k/scn2k_grp.cc @@ -1269,7 +1269,10 @@ void GrpImpl::LoadCgm(AyuSysConfig& conf delete info; - if ( strncmp(data, "CGTABLE", 7) != 0) return; + if ( strncmp(data, "CGTABLE", 7) != 0) { + delete[] data; + return; + } int cgm_size = read_little_endian_int(data+0x10); int i,j; @@ -1289,6 +1292,7 @@ void GrpImpl::LoadCgm(AyuSysConfig& conf int n = read_little_endian_int(dest + i * 36 + 32); cgm_info[s] = n; } + delete[] data; delete[] dest_orig; }