summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2020-11-09 15:59:36 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2020-11-10 09:22:43 +0100
commit72585a584d26eec4bb9ea6c30fc101f1e4f0d7f9 (patch)
tree5e8ef7cc5057fbe6a31786ba190ca6410b2d32b9
parentudev: log when we fail to query ID_NET_DRIVER (diff)
downloadsystemd-72585a584d26eec4bb9ea6c30fc101f1e4f0d7f9.tar.xz
systemd-72585a584d26eec4bb9ea6c30fc101f1e4f0d7f9.zip
core: add missing oom check
Fixes #17552.
Diffstat (limited to '')
-rw-r--r--src/core/socket.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core/socket.c b/src/core/socket.c
index 7b3827ae87..7f8ac4eae9 100644
--- a/src/core/socket.c
+++ b/src/core/socket.c
@@ -1710,6 +1710,8 @@ static int socket_open_fds(Socket *_s) {
_cleanup_free_ char *ep = NULL;
ep = path_make_absolute("ep0", p->path);
+ if (!ep)
+ return -ENOMEM;
p->fd = usbffs_address_create(ep);
if (p->fd < 0)