diff options
author | Torbjörn Andersson | 2013-07-13 23:08:32 +0200 |
---|---|---|
committer | Torbjörn Andersson | 2013-07-13 23:08:32 +0200 |
commit | d0df423575567c134da6586e50a1c8ec24a09d89 (patch) | |
tree | cd305e73f49feb7d8bcb79e90c17e9d4f643c3f1 /devtools/skycpt | |
parent | a5864d992dc1d494c088e779e8300bdd438923f4 (diff) | |
download | scummvm-rg350-d0df423575567c134da6586e50a1c8ec24a09d89.tar.gz scummvm-rg350-d0df423575567c134da6586e50a1c8ec24a09d89.tar.bz2 scummvm-rg350-d0df423575567c134da6586e50a1c8ec24a09d89.zip |
DEVTOOLS: Fix unimportant memory/resource leaks
CID 1022280, 1022281, 1022282
Diffstat (limited to 'devtools/skycpt')
-rw-r--r-- | devtools/skycpt/cptcompiler.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/devtools/skycpt/cptcompiler.cpp b/devtools/skycpt/cptcompiler.cpp index 2c7d33c73b..657f51b8a0 100644 --- a/devtools/skycpt/cptcompiler.cpp +++ b/devtools/skycpt/cptcompiler.cpp @@ -376,6 +376,7 @@ void doCompile(FILE *inf, FILE *debOutf, FILE *resOutf, TextFile *cptDef, FILE * uint32 asciiSize = (uint32)(asciiPos - asciiBuf); fwrite(&asciiSize, 1, 4, debOutf); fwrite(asciiBuf, 1, asciiSize, debOutf); + free(asciiBuf); // the direct links... fwrite(&dlinkCount, 2, 1, debOutf); @@ -438,6 +439,8 @@ void doCompile(FILE *inf, FILE *debOutf, FILE *resOutf, TextFile *cptDef, FILE * diffNo++; } } + fclose(dif); + free(resCpts); assert(diffDest <= 8192); fwrite(&diffNo, 1, 2, debOutf); fwrite(&diffDest, 1, 2, debOutf); |