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

This commit is contained in:
Mario Zechner 2024-06-27 18:09:17 +02:00
parent 578084806d
commit 82cb7f5cad

View File

@ -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;
}