13
0

free track name/instrument string memory when necessary

This commit is contained in:
Paul Davis 2016-12-14 11:38:31 +00:00
parent 28caef7d81
commit 8002a0c66e

View File

@ -150,6 +150,13 @@ smf_track_delete(smf_track_t *track)
assert(track->events_array->len == 0);
g_ptr_array_free(track->events_array, TRUE);
if (track->name) {
free (track->name);
}
if (track->instrument) {
free (track->instrument);
}
memset(track, 0, sizeof(smf_track_t));
free(track);
}