WHATS_NEW | 1 +
libdaemon/client/daemon-io.c | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 934acfc..51f1be6 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -5,6 +5,7 @@ Version 2.02.100 -
Version 2.02.99 -
===================================
+ Fix use of too big chunks of memory when communication with lvmetad.
Respect lvmetad global filter in pvscan --cache with a device.
Use LOG_DEBUG/ERR msg severity instead default for lvm2-activation-generator.
Fix premature DM version checking which caused useless mapper/control access.
diff --git a/libdaemon/client/daemon-io.c b/libdaemon/client/daemon-io.c
index 37f2744..6ede8a8 100644
--- a/libdaemon/client/daemon-io.c
+++ b/libdaemon/client/daemon-io.c
@@ -41,7 +41,7 @@ int buffer_read(int fd, struct buffer *buffer) {
buffer->used -= 4;
break; /* success, we have the full message now */
}
- if (buffer->used - buffer->allocated < 32)
+ if (buffer->allocated - buffer->used < 32)
if (!buffer_realloc(buffer, 1024))
goto fail;
continue;