[systemd-commits] stable Branch 'v208-stable' - src/analyze

Zbigniew Jędrzejewski-Szmek zbyszek at kemper.freedesktop.org
Sat Aug 9 06:54:39 PDT 2014


 src/analyze/systemd-analyze.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 53b1b6c653258b440bf6ce1a64703dad5b3ab158
Author: Zbigniew Jędrzejewski-Szmek <zbyszek at in.waw.pl>
Date:   Sat Aug 9 09:53:34 2014 -0400

    analyze: fix crash on invalid commandline
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1128360

diff --git a/src/analyze/systemd-analyze.c b/src/analyze/systemd-analyze.c
index 25f8ad6..db5d6e6 100644
--- a/src/analyze/systemd-analyze.c
+++ b/src/analyze/systemd-analyze.c
@@ -1236,13 +1236,14 @@ static int set_log_level(DBusConnection *bus, char **args) {
         assert(bus);
         assert(args);
 
+        dbus_error_init(&error);
+
         if (strv_length(args) != 1) {
                 log_error("This command expects one argument only.");
                 return -E2BIG;
         }
 
         value = args[0];
-        dbus_error_init(&error);
 
         m = dbus_message_new_method_call("org.freedesktop.systemd1",
                                          "/org/freedesktop/systemd1",



More information about the systemd-commits mailing list