ryantimwilson / rpms / systemd

Forked from rpms/systemd 2 months ago
Clone
65878a
From dc74e25f66f2aa56b6c6fa2fd51fd1ee02a4b770 Mon Sep 17 00:00:00 2001
65878a
From: Lennart Poettering <lennart@poettering.net>
65878a
Date: Wed, 2 Oct 2013 19:36:43 +0200
65878a
Subject: [PATCH] journald: add missing error check
65878a
65878a
---
65878a
 src/journal/journal-file.c | 2 ++
65878a
 1 file changed, 2 insertions(+)
65878a
65878a
diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c
65878a
index 1236403..81c344f 100644
65878a
--- a/src/journal/journal-file.c
65878a
+++ b/src/journal/journal-file.c
65878a
@@ -907,6 +907,8 @@ static int journal_file_append_field(
65878a
 
65878a
         osize = offsetof(Object, field.payload) + size;
65878a
         r = journal_file_append_object(f, OBJECT_FIELD, osize, &o, &p);
65878a
+        if (r < 0)
65878a
+                return r;
65878a
 
65878a
         o->field.hash = htole64(hash);
65878a
         memcpy(o->field.payload, field, size);