Fix memory leak in flac command line tool (#746)

Credit: Oss-Fuzz
Issue: https://issues.oss-fuzz.com/issues/42538282
This commit is contained in:
Martijn van Beurden 2024-09-30 20:52:13 +02:00 committed by GitHub
parent e4f1ee9fff
commit a89875d8b1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -162,6 +162,7 @@ static FLAC__bool set_vc_field(FLAC__StreamMetadata *block, const Argument_VcFie
}
free(converted);
if(!FLAC__metadata_object_vorbiscomment_append_comment(block, entry, /*copy=*/false)) {
free(entry.entry);
*violation = "memory allocation failure";
return false;
}