Fixed small memory leak.

This commit is contained in:
NathanSweet 2014-05-08 19:26:34 +02:00
parent 5c6ebf2c63
commit 77d7bf83fb
2 changed files with 2 additions and 1 deletions

View File

@ -55,7 +55,7 @@
#define FREE(VALUE) _free((void*)VALUE)
/* Allocates a new char[], assigns it to TO, and copies FROM to it. Can be used on const types. */
#define MALLOC_STR(TO,FROM) strcpy(CONST_CAST(char*, TO) = (char*)malloc(strlen(FROM) + 1), FROM)
#define MALLOC_STR(TO,FROM) strcpy(CONST_CAST(char*, TO) = (char*)MALLOC(char, strlen(FROM) + 1), FROM)
#ifdef __STDC_VERSION__
#define FMOD(A,B) fmodf(A, B)

View File

@ -34,6 +34,7 @@
void _spRegionAttachment_dispose (spAttachment* attachment) {
spRegionAttachment* self = SUB_CAST(spRegionAttachment, attachment);
_spAttachment_deinit(attachment);
FREE(self->path);
FREE(self);
}