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:
parent
b2f1b918ed
commit
14a12acc76
@ -228,7 +228,9 @@ MouseDevice::Start()
|
||||
if (status < B_OK) {
|
||||
LOG_ERR("%s: can't spawn/resume watching thread: %s\n",
|
||||
fDeviceRef.name, strerror(status));
|
||||
close(fDevice);
|
||||
if (fDevice >= B_OK)
|
||||
close(fDevice);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user