[systemd-devel] [PATCH 1/5] journalctl: check return of strjoin

Lukas Nykryn lnykryn at redhat.com
Wed Apr 10 03:53:58 PDT 2013


---
 src/journal/journalctl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c
index 86895b8..002ff7c 100644
--- a/src/journal/journalctl.c
+++ b/src/journal/journalctl.c
@@ -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;
                         }
-- 
1.8.1.4



More information about the systemd-devel mailing list