From: Phil Carmody Date: Wed, 10 Sep 2014 11:08:58 +0000 (+0300) Subject: lib-test: don't use 0 for old size in realloc call X-Git-Tag: 2.2.14.rc1~88 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b85ff8f5b1d74daef315f120926bf18c2423e9aa;p=thirdparty%2Fdovecot%2Fcore.git lib-test: don't use 0 for old size in realloc call We have the real size, use it. Signed-off-by: Phil Carmody --- diff --git a/src/lib-test/test-common.c b/src/lib-test/test-common.c index af055a8401..ad1badef16 100644 --- a/src/lib-test/test-common.c +++ b/src/lib-test/test-common.c @@ -59,7 +59,8 @@ static ssize_t test_read(struct istream_private *stream) /* use exactly correct buffer size so valgrind can catch read overflows */ if (stream->buffer_size != cur_max && cur_max > 0) { - stream->w_buffer = i_realloc(stream->w_buffer, 0, + stream->w_buffer = i_realloc(stream->w_buffer, + stream->buffer_size, cur_max); stream->buffer = stream->w_buffer; stream->buffer_size = cur_max;