1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-01-11 05:17:44 +03:00

sd-bus: fix memleak in failure path in bus_match_parse()

This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2021-03-05 15:16:18 +01:00
parent f92d8e4446
commit 8df3f44c90

View File

@ -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] == '\'';