diff options
author | Lennart Poettering <lennart@poettering.net> | 2018-10-15 19:23:09 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2018-10-15 19:40:51 +0200 |
commit | a4209121d77a3298f6a2b974f92f69d1227b803e (patch) | |
tree | f7aa368d5a37582bdabd947360516466e3191f46 /src/udev/udev-ctrl.c | |
parent | tree-wide: add a single version of "static const int one = 1" (diff) | |
download | systemd-a4209121d77a3298f6a2b974f92f69d1227b803e.tar.xz systemd-a4209121d77a3298f6a2b974f92f69d1227b803e.zip |
udev: use safe_close() where we can
Diffstat (limited to '')
-rw-r--r-- | src/udev/udev-ctrl.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/udev/udev-ctrl.c b/src/udev/udev-ctrl.c index 312c0b2ae8..bde8b63dde 100644 --- a/src/udev/udev-ctrl.c +++ b/src/udev/udev-ctrl.c @@ -197,8 +197,7 @@ struct udev_ctrl_connection *udev_ctrl_get_connection(struct udev_ctrl *uctrl) { udev_ctrl_ref(uctrl); return conn; err: - if (conn->sock >= 0) - close(conn->sock); + safe_close(conn->sock); return mfree(conn); } |