From: Thomas Hindoe Paaboel Andersen Date: Sun, 31 Aug 2014 20:54:40 +0000 (+0200) Subject: journal-remote: fix check if realloc failed X-Git-Tag: v217~683 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=e4c38cc36e287d46a56a98066cc368ee6fdd1968;hp=5bb14c8651b017983bb9cbd1444969c7a1bda14e journal-remote: fix check if realloc failed --- diff --git a/src/journal-remote/journal-remote-parse.c b/src/journal-remote/journal-remote-parse.c index dfb87d49a..e7eb1516f 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 {