udev_device_get_parent return a pointer to the parent device. No
additional reference to this device is acquired, but the child device
owns a reference to such a parent device. On failure, NULL is returned.
unreferencing the pointer returned by udev_device_get_parent is
incorrect, and abort the program in some version of libudev due to a
failing assertion:
Assertion 'p->n_ref > 0' failed at src/libudev/libudev-device.c:502, function udev_device_unref. Aborting.
udev_device_get_parent return a pointer to the parent device. No additional reference to this device is acquired, but the child device owns a reference to such a parent device. On failure, NULL is returned.
unreferencing the pointer returned by udev_device_get_parent is incorrect, and abort the program in some version of libudev due to a failing assertion:
Assertion 'p->n_ref > 0' failed at src/libudev/libudev-device.c:502, function udev_device_unref. Aborting.