Set dev->fd to -1 when calling cam_close_spec_device with a valid dev->fd
descriptor to avoid trashing valid file descriptors that access dev->fd at a later point in time PR: 192671 Submitted by: Scott Ferris <scott.ferris@isilon.com> MFC after: 1 week Sponsored by: EMC / Isilon Storage Division
This commit is contained in:
parent
3f18b7fa12
commit
211d866621
@ -676,8 +676,10 @@ cam_close_spec_device(struct cam_device *dev)
|
||||
if (dev == NULL)
|
||||
return;
|
||||
|
||||
if (dev->fd >= 0)
|
||||
if (dev->fd >= 0) {
|
||||
close(dev->fd);
|
||||
dev->fd = -1;
|
||||
}
|
||||
}
|
||||
|
||||
char *
|
||||
|
Loading…
Reference in New Issue
Block a user