don't call selinux_restore() if namedev_name_device() failed.
PATCH 1/1 don't call selinux_restore() if namedev_name_device() failed.
Hi,
The attached patch fixes the code path if namedev_name_device() fails. As selinux_init() is not called we should not call selinux_restore(). Is this correct? It's not tested as I don't have selinux.
Signature · 1 line
Regards Michael Buesch [ http://www.tuxsoft.de.vu ]
===== udev_add.c 1.87 vs edited =====
udev_add.c +1 -1
@@ -292,7 +292,7 @@ }if (namedev_name_device (udev, class_dev) !=0 ) - goto exit; +return 0 ;dbg ("adding name='%s'" , udev->name);