diff options
Diffstat (limited to 'src/dbus-execute.c')
-rw-r--r-- | src/dbus-execute.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/dbus-execute.c b/src/dbus-execute.c index 55c61e593f..1222d1bfd2 100644 --- a/src/dbus-execute.c +++ b/src/dbus-execute.c @@ -209,11 +209,13 @@ int bus_execute_append_capabilities(Manager *m, DBusMessageIter *i, const char * else s = ""; - if (!t) + if (!s) return -ENOMEM; b = dbus_message_iter_append_basic(i, DBUS_TYPE_STRING, &s); - cap_free(t); + + if (t) + cap_free(t); if (!b) return -ENOMEM; |