Fixed leak when open returns 0

This commit is contained in:
Robert Osfield
2016-06-28 15:31:55 +01:00
parent 9aa8497fbf
commit 07a0b52e6c

View File

@@ -161,7 +161,7 @@ load_md2 (const char *filename, const osgDB::ReaderWriter::Options* options)
}
file_fd = open (filename, O_RDONLY);
if (file_fd <= 0) {
if (file_fd < 0) {
return NULL;
}