|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
From e4c38cc36e287d46a56a98066cc368ee6fdd1968 Mon Sep 17 00:00:00 2001
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
From: Thomas Hindoe Paaboel Andersen <phomes@gmail.com>
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
Date: Sun, 31 Aug 2014 22:54:40 +0200
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
Subject: [PATCH] journal-remote: fix check if realloc failed
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
---
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
src/journal-remote/journal-remote-parse.c | 2 +-
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
diff --git a/src/journal-remote/journal-remote-parse.c b/src/journal-remote/journal-remote-parse.c
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
index dfb87d49af..e7eb1516fb 100644
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
--- a/src/journal-remote/journal-remote-parse.c
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
+++ b/src/journal-remote/journal-remote-parse.c
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
@@ -478,7 +478,7 @@ int process_source(RemoteSource *source, bool compress, bool seal) {
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
char *tmp;
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
tmp = realloc(source->buf, target);
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
- if (tmp)
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
+ if (!tmp)
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
log_warning("Failed to reallocate buffer to (smaller) size %zu",
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
target);
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
else {
|