Fix SSL_MODE_RELEASE_BUFFERS functionality
authorMatt Caswell <matt@openssl.org>
Thu, 1 Aug 2019 13:55:25 +0000 (14:55 +0100)
committerMatt Caswell <matt@openssl.org>
Mon, 5 Aug 2019 16:12:21 +0000 (17:12 +0100)
commit8bbf63e48f27c5edaa03e6d87d969c9b6a207f3c
treed9bec3fc80b8d7aedcd51e356ba58693c8f6bca8
parent59972370e391d6f6314cee26529cbda41eb0a198
Fix SSL_MODE_RELEASE_BUFFERS functionality

At some point in the past do_ssl3_write() used to return the number of
bytes written, or a value <= 0 on error. It now just returns a success/
error code and writes the number of bytes written to |tmpwrit|.

The SSL_MODE_RELEASE_BUFFERS code was still looking at the return code
for the number of bytes written rather than |tmpwrit|. This has the effect
that the buffers are not released when they are supposed to be.

Fixes #9490

Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/9505)
ssl/record/rec_layer_s3.c