diff options
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/service.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/service.c b/src/core/service.c index c035f4c24e..2ba7511ad2 100644 --- a/src/core/service.c +++ b/src/core/service.c @@ -3219,6 +3219,11 @@ static int service_deserialize_item(Unit *u, const char *key, const char *value, } else if (streq(key, "accept-socket")) { Unit *socket; + if (u->type != UNIT_SOCKET) { + log_unit_debug(u, "Failed to deserialize accept-socket: unit is not a socket"); + return 0; + } + r = manager_load_unit(u->manager, value, NULL, NULL, &socket); if (r < 0) log_unit_debug_errno(u, r, "Failed to load accept-socket unit '%s': %m", value); |