fix memory leak in Cuesheet destructor

This commit is contained in:
Josh Coalson 2002-12-27 21:05:18 +00:00
parent 28311cfd1a
commit 75c863eac9

View File

@ -763,13 +763,15 @@ namespace FLAC {
void CueSheet::Track::operator=(const Track &track)
{
if(0 != object_)
free(object_);
object_ = ::FLAC__metadata_object_cuesheet_track_clone(track.object_);
}
CueSheet::Track::~Track()
{
if(0 != object_)
delete object_;
free(object_);
}
bool CueSheet::Track::is_valid() const