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 dfb87d4..e7eb151 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 {