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 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);
                 char _cleanup_free_ *copy = NULL;
                 if (arg_root) {
                         copy = strjoin(arg_root, "/", CATALOG_DATABASE, NULL);
-                        if (!database) {
+                        if (!copy) {
                                 r = log_oom();
                                 goto finish;
                         }
                                 r = log_oom();
                                 goto finish;
                         }