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:
@@ -1134,6 +1134,7 @@ DCPProfile::DCPProfile(const Glib::ustring& filename) :
|
|||||||
DCPMetadata md(file);
|
DCPMetadata md(file);
|
||||||
if (!md.parse()) {
|
if (!md.parse()) {
|
||||||
printf ("Unable to load DCP profile '%s'.", filename.c_str());
|
printf ("Unable to load DCP profile '%s'.", filename.c_str());
|
||||||
|
fclose(file);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user