summaryrefslogtreecommitdiffstats
path: root/src/journal-remote/journal-remote-parse.c
diff options
context:
space:
mode:
authorThomas Hindoe Paaboel Andersen <phomes@gmail.com>2014-08-31 22:54:40 +0200
committerThomas Hindoe Paaboel Andersen <phomes@gmail.com>2014-08-31 23:25:30 +0200
commite4c38cc36e287d46a56a98066cc368ee6fdd1968 (patch)
treeb4f546f334fa2fe731511b0cd9fa9065a3e24f30 /src/journal-remote/journal-remote-parse.c
parenttest-network: fix off-by-one error in test (diff)
downloadsystemd-e4c38cc36e287d46a56a98066cc368ee6fdd1968.tar.xz
systemd-e4c38cc36e287d46a56a98066cc368ee6fdd1968.zip
journal-remote: fix check if realloc failed
Diffstat (limited to 'src/journal-remote/journal-remote-parse.c')
-rw-r--r--src/journal-remote/journal-remote-parse.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/journal-remote/journal-remote-parse.c b/src/journal-remote/journal-remote-parse.c
index dfb87d49af..e7eb1516fb 100644
--- a/src/journal-remote/journal-remote-parse.c
+++ b/src/journal-remote/journal-remote-parse.c
@@ -478,7 +478,7 @@ int process_source(RemoteSource *source, bool compress, bool seal) {
char *tmp;
tmp = realloc(source->buf, target);
- if (tmp)
+ if (!tmp)
log_warning("Failed to reallocate buffer to (smaller) size %zu",
target);
else {