Fix Coverity Scan CID 60371 (Handle variable fd going out of scope leaks the handle.)
This commit is contained in:
@@ -125,6 +125,7 @@ void* device_open(int type, const char* devpath, const char* params)
|
||||
if (stty_set(fd, params) != RETURNok) {
|
||||
device_close(devid);
|
||||
devid = NULL;
|
||||
close(fd);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user