Fix Coverity Scan CID 60371 (Handle variable fd going out of scope leaks the handle.)

This commit is contained in:
Dong Anyuan
2019-06-20 12:35:33 +09:00
parent 1d017a3625
commit d7f9a3578d
+1
View File
@@ -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);
}
}
}