dcp: avoid file descriptor leak on error.

If the provided file doesn't contain valid dcp metadata the DCPProfile
constructor will return without closing the file descriptor.
This commit is contained in:
Simone Gotti
2024-04-22 09:45:12 +02:00
parent c72e67ae24
commit 232c11c37c

View File

@@ -1134,6 +1134,7 @@ DCPProfile::DCPProfile(const Glib::ustring& filename) :
DCPMetadata md(file);
if (!md.parse()) {
printf ("Unable to load DCP profile '%s'.", filename.c_str());
fclose(file);
return;
}