chiark / gitweb /
journalctl: check return of strjoin
[elogind.git] / src / journal / journalctl.c
index 86895b8f5b86c7cd3aaec07d356d694b534f102a..002ff7cda08d5ad98c52b383cd7122de0672e9f2 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;
                         }