Эх сурвалжийг харах

[cpp] Closes #2563, free input and skeleton data on parsing failure.

Mario Zechner 1 жил өмнө
parent
commit
82cb7f5cad

+ 2 - 0
spine-cpp/spine-cpp/src/spine/SkeletonBinary.cpp

@@ -125,6 +125,8 @@ SkeletonData *SkeletonBinary::readSkeletonData(const unsigned char *binary, cons
 		char errorMsg[255];
 		snprintf(errorMsg, 255, "Skeleton version %s does not match runtime version %s", skeletonData->_version.buffer(), SPINE_VERSION_STRING);
 		setError(errorMsg, "");
+        delete input;
+        delete skeletonData;
 		return NULL;
 	}