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