server: Hold a reference to the device on behalf of the device manager.
commit0bd7da4290ea32da0dba92c0190e2fb839580c3d
authorZebediah Figura <z.figura12@gmail.com>
Fri, 14 Feb 2020 18:10:20 +0000 (14 12:10 -0600)
committerAlexandre Julliard <julliard@winehq.org>
Tue, 3 Mar 2020 10:43:01 +0000 (3 11:43 +0100)
tree8838ed6949a0549df7af2dbe4fa727824f5be4fd
parent2b9c7f8bfb49c953a12b73c99d21b892d6d339e4
server: Hold a reference to the device on behalf of the device manager.

Otherwise, the only thing holding a reference to a device may be a
device_file. If this is released in delete_device(), the subsequent call to
unlink_named_object() will crash. This can occur if a device driver crashes
with pending IRPs outstanding.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
server/device.c