Commit 1654a046 authored by Alan Coopersmith's avatar Alan Coopersmith
Browse files

Solaris: Fix fd leak in pci_device_solx_devfs_map_range()

Caching fd's for reuse is most effective when you actually stick the
newly opened fd in the cache, instead of letting it leak at the end
of the function.

Regression introduced by yours truly in commit 9f2d95e6

.
Signed-off-by: Alan Coopersmith's avatarAlan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: default avatarRandy Fishel <randy.fishel@oracle.com>
parent ee4e253a
...@@ -724,6 +724,9 @@ pci_device_solx_devfs_map_range(struct pci_device *dev, ...@@ -724,6 +724,9 @@ pci_device_solx_devfs_map_range(struct pci_device *dev,
strerror(errno)); strerror(errno));
return err; return err;
} }
#ifndef __sparc
xsvc_fd = map_fd;
#endif
} }
map->memory = mmap(NULL, map->size, prot, MAP_SHARED, map_fd, map->base); map->memory = mmap(NULL, map->size, prot, MAP_SHARED, map_fd, map->base);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment