Update SkeletonBinary.c (#2790)

remove making extra copy of cString which cause the existing cString to be leak, and can not be disposed later,
This commit is contained in:
Byeong Gwan 2025-04-08 18:47:32 +09:00 committed by GitHub
parent 294399886a
commit 4071565a9c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1178,11 +1178,6 @@ spAttachment *spSkeletonBinary_readAttachment(spSkeletonBinary *self, _dataInput
return NULL;
mesh = SUB_CAST(spMeshAttachment, attachment);
mesh->path = (char *) path;
if (mesh->path) {
char *tmp = NULL;
MALLOC_STR(tmp, mesh->path);
mesh->path = tmp;
}
spColor_setFromColor(&mesh->color, &color);
mesh->sequence = sequence;
mesh->width = width;