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:
parent
f92d8e4446
commit
8df3f44c90
@ -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] == '\'';
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user