From 5ea249a265e6d6f1ee88e94002bf721410a1245f Mon Sep 17 00:00:00 2001 From: rablwupei Date: Tue, 8 Oct 2013 20:03:10 +0800 Subject: [PATCH] fix memory leak --- extensions/spine/Atlas.cpp | 2 +- extensions/spine/SkeletonJson.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/spine/Atlas.cpp b/extensions/spine/Atlas.cpp index 281e214d77..8b9861463f 100644 --- a/extensions/spine/Atlas.cpp +++ b/extensions/spine/Atlas.cpp @@ -303,7 +303,7 @@ Atlas* Atlas_readAtlasFile (const char* path) { data = _Util_readFile(path, &length); if (data) atlas = Atlas_readAtlas(data, length, dir); - FREE(data); + delete [] data; FREE(dir); return atlas; } diff --git a/extensions/spine/SkeletonJson.cpp b/extensions/spine/SkeletonJson.cpp index 965a43f2a5..35a0daa787 100644 --- a/extensions/spine/SkeletonJson.cpp +++ b/extensions/spine/SkeletonJson.cpp @@ -240,7 +240,7 @@ SkeletonData* SkeletonJson_readSkeletonDataFile (SkeletonJson* self, const char* return 0; } skeletonData = SkeletonJson_readSkeletonData(self, json); - FREE(json); + delete [] json; return skeletonData; }