bus: fix parsing of matches against empty strings

This commit is contained in:
Lennart Poettering
2013-12-12 21:25:31 +01:00
parent 5fba7bbfa4
commit 2c8d477a01

View File

@@ -755,6 +755,14 @@ int bus_match_parse(
escaped = false;
}
if (!value) {
value = strdup("");
if (!value) {
r = -ENOMEM;
goto fail;
}
}
if (t == BUS_MATCH_MESSAGE_TYPE) {
r = bus_message_type_from_string(value, &u);
if (r < 0)