diff options
author | Lennart Poettering <lennart@poettering.net> | 2010-08-09 17:02:09 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2010-08-09 17:07:05 +0200 |
commit | 04ade7d215ce05f1ac2bd33a8d6126f6994168fa (patch) | |
tree | c3e170de2068995fea15134a837eece2271f89d5 /src/unit.c | |
parent | 6d4fc029d9c6647927f3b73235d5d5bb17ce46ee (diff) |
dbus: don't call bus_path_escape() with NULL unit name
Fixes an assertion triggerable via D-Bus.
https://bugzilla.redhat.com/show_bug.cgi?id=622008
Diffstat (limited to 'src/unit.c')
-rw-r--r-- | src/unit.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/unit.c b/src/unit.c index 840c1d1fc4..dd665e2d5a 100644 --- a/src/unit.c +++ b/src/unit.c @@ -1551,6 +1551,9 @@ char *unit_dbus_path(Unit *u) { assert(u); + if (!u->meta.id) + return NULL; + if (!(e = bus_path_escape(u->meta.id))) return NULL; |