From 72585a584d26eec4bb9ea6c30fc101f1e4f0d7f9 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Mon, 9 Nov 2020 23:59:36 +0900 Subject: core: add missing oom check Fixes #17552. --- src/core/socket.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/core/socket.c') 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) -- cgit v1.2.3