chiark / gitweb /
journalctl: check return of strjoin
[elogind.git] / src / journal / journalctl.c
index 1f26787cf7449b4449c8ca5b135988f742b3091c..002ff7cda08d5ad98c52b383cd7122de0672e9f2 100644 (file)
@@ -27,7 +27,6 @@
 #include <stdio.h>
 #include <unistd.h>
 #include <stdlib.h>
-#include <sys/poll.h>
 #include <time.h>
 #include <getopt.h>
 #include <signal.h>
@@ -1036,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;
                         }