chiark / gitweb /
journalctl: check return of strjoin
authorLukas Nykryn <lnykryn@redhat.com>
Wed, 10 Apr 2013 10:53:58 +0000 (12:53 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 10 Apr 2013 22:59:42 +0000 (18:59 -0400)
src/journal/journalctl.c

index 86895b8..002ff7c 100644 (file)
@@ -1035,7 +1035,7 @@ int main(int argc, char *argv[]) {
                 char _cleanup_free_ *copy = NULL;
                 if (arg_root) {
                         copy = strjoin(arg_root, "/", CATALOG_DATABASE, NULL);
-                        if (!database) {
+                        if (!copy) {
                                 r = log_oom();
                                 goto finish;
                         }