chiark / gitweb /
coredumpctl: fix program return code
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 30 Oct 2012 08:44:32 +0000 (09:44 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 30 Oct 2012 10:24:00 +0000 (11:24 +0100)
src/journal/coredumpctl.c

index 3560534..03f063f 100644 (file)
@@ -476,10 +476,13 @@ int main(int argc, char *argv[]) {
         log_open();
 
         matches = new_matches();
         log_open();
 
         matches = new_matches();
-        if (!matches)
+        if (!matches) {
+                r = -ENOMEM;
                 goto end;
                 goto end;
+        }
 
 
-        if (parse_argv(argc, argv))
+        r = parse_argv(argc, argv);
+        if (r < 0)
                 goto end;
 
         if (arg_action == ACTION_NONE)
                 goto end;
 
         if (arg_action == ACTION_NONE)