core: make sure to not call device_is_bound_by_mounts() when dev is null (#5033)
authorFranck Bui <fbui@suse.com>
Tue, 10 Jan 2017 08:11:34 +0000 (09:11 +0100)
committerMartin Pitt <martin.pitt@ubuntu.com>
Tue, 10 Jan 2017 08:11:34 +0000 (09:11 +0100)
commitd13489e2be3e698616b1da3c8267709115d3d099
tree8206b1d0e4b4e69ff59448bf88457caab8c84dbe
parent91b8fd3cadc65b9d62a272bf5095d1ea9299d9e5
core: make sure to not call device_is_bound_by_mounts() when dev is null (#5033)

device_setup_unit() might be called (when an event happened in
/proc/self/mountinfo for example) with a null 'dev' parameter. This
indicates that the device has been unplugged but the corresponding
mountpoint is still visible in /proc/self/mountinfo.

This patch makes sure we don't call device_is_bound_by_mounts() in
this case.

Fixes: #5025
src/core/device.c