summaryrefslogtreecommitdiff
path: root/udev/udev-ctrl.c
diff options
context:
space:
mode:
Diffstat (limited to 'udev/udev-ctrl.c')
-rw-r--r--udev/udev-ctrl.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/udev/udev-ctrl.c b/udev/udev-ctrl.c
index 43484cc838..4bca807b69 100644
--- a/udev/udev-ctrl.c
+++ b/udev/udev-ctrl.c
@@ -156,12 +156,17 @@ struct udev_ctrl *udev_ctrl_unref(struct udev_ctrl *uctrl)
return uctrl;
if (uctrl->sock >= 0)
close(uctrl->sock);
- if (uctrl->cleanup_socket)
- unlink(uctrl->saddr.sun_path);
free(uctrl);
return NULL;
}
+int udev_ctrl_cleanup(struct udev_ctrl *uctrl)
+{
+ if (uctrl->cleanup_socket)
+ unlink(uctrl->saddr.sun_path);
+ return 0;
+}
+
int udev_ctrl_get_fd(struct udev_ctrl *uctrl)
{
if (uctrl == NULL)