decoder/flac: fixed two memory leaks in the CUE tag loader
Don't initialize "vc" and "cs" with FLAC__metadata_object_new(); that value is overwritten by FLAC__metadata_get_tags() and FLAC__metadata_get_cuesheet().
This commit is contained in:
parent
8ae5bc4d79
commit
d09e19c3dc
2
NEWS
2
NEWS
|
@ -4,6 +4,8 @@ ver 0.15.5 (2009/??/??)
|
||||||
- curl: fixed endless loop during buffering
|
- curl: fixed endless loop during buffering
|
||||||
* tags:
|
* tags:
|
||||||
- riff, aiff: fixed "limited range" gcc warning
|
- riff, aiff: fixed "limited range" gcc warning
|
||||||
|
* decoders:
|
||||||
|
- flac: fixed two memory leaks in the CUE tag loader
|
||||||
* decoder_thread: change the fallback decoder name to "mad"
|
* decoder_thread: change the fallback decoder name to "mad"
|
||||||
* output_thread: check again if output is open on CANCEL
|
* output_thread: check again if output is open on CANCEL
|
||||||
* update: fixed memory leak during container scan
|
* update: fixed memory leak during container scan
|
||||||
|
|
|
@ -299,10 +299,10 @@ flac_cue_tag_load(const char *file)
|
||||||
unsigned int sample_rate = 0;
|
unsigned int sample_rate = 0;
|
||||||
FLAC__uint64 track_time = 0;
|
FLAC__uint64 track_time = 0;
|
||||||
#ifdef HAVE_CUE /* libcue */
|
#ifdef HAVE_CUE /* libcue */
|
||||||
FLAC__StreamMetadata* vc = FLAC__metadata_object_new(FLAC__METADATA_TYPE_VORBIS_COMMENT);
|
FLAC__StreamMetadata* vc;
|
||||||
#endif /* libcue */
|
#endif /* libcue */
|
||||||
FLAC__StreamMetadata* si = FLAC__metadata_object_new(FLAC__METADATA_TYPE_STREAMINFO);
|
FLAC__StreamMetadata* si = FLAC__metadata_object_new(FLAC__METADATA_TYPE_STREAMINFO);
|
||||||
FLAC__StreamMetadata* cs = FLAC__metadata_object_new(FLAC__METADATA_TYPE_CUESHEET);
|
FLAC__StreamMetadata* cs;
|
||||||
|
|
||||||
tnum = flac_vtrack_tnum(file);
|
tnum = flac_vtrack_tnum(file);
|
||||||
char_tnum = g_strdup_printf("%u", tnum);
|
char_tnum = g_strdup_printf("%u", tnum);
|
||||||
|
@ -326,6 +326,7 @@ flac_cue_tag_load(const char *file)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
FLAC__metadata_object_delete(vc);
|
FLAC__metadata_object_delete(vc);
|
||||||
}
|
}
|
||||||
#endif /* libcue */
|
#endif /* libcue */
|
||||||
|
|
Loading…
Reference in New Issue