Only close device if it's a valid fd. CID 3466.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39982 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -228,7 +228,9 @@ MouseDevice::Start()
|
|||||||
if (status < B_OK) {
|
if (status < B_OK) {
|
||||||
LOG_ERR("%s: can't spawn/resume watching thread: %s\n",
|
LOG_ERR("%s: can't spawn/resume watching thread: %s\n",
|
||||||
fDeviceRef.name, strerror(status));
|
fDeviceRef.name, strerror(status));
|
||||||
close(fDevice);
|
if (fDevice >= B_OK)
|
||||||
|
close(fDevice);
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user