diff --git a/src/libsystemd/sd-bus/bus-match.c b/src/libsystemd/sd-bus/bus-match.c index eb719c0105..71a6cd1318 100644 --- a/src/libsystemd/sd-bus/bus-match.c +++ b/src/libsystemd/sd-bus/bus-match.c @@ -733,12 +733,16 @@ int bus_match_parse( p += strspn(p, " "); eq = strchr(p, '='); - if (!eq) - return -EINVAL; + if (!eq) { + r = -EINVAL; + goto fail; + } t = bus_match_node_type_from_string(p, eq - p); - if (t < 0) - return -EINVAL; + if (t < 0) { + r = -EINVAL; + goto fail; + } quoted = eq[1] == '\'';