chiark / gitweb /
journal-remote: fix check if realloc failed
authorThomas Hindoe Paaboel Andersen <phomes@gmail.com>
Sun, 31 Aug 2014 20:54:40 +0000 (22:54 +0200)
committerThomas Hindoe Paaboel Andersen <phomes@gmail.com>
Sun, 31 Aug 2014 21:25:30 +0000 (23:25 +0200)
src/journal-remote/journal-remote-parse.c

index dfb87d49af7f88a17b1de4751f751c088f09afac..e7eb1516fbac2b21abe3680bad79ad7b51cb19b8 100644 (file)
@@ -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 {