QUIC DDD: Fix bug in ddd-06-mem-uv

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21715)
This commit is contained in:
Hugo Landau 2023-08-09 17:46:33 +01:00
parent 62665fc243
commit b1cb0675e5
1 changed files with 4 additions and 3 deletions

View File

@ -237,11 +237,12 @@ static void on_rx_push(APP_CONN *conn)
srd = SSL_read(conn->ssl, buf, buf_len);
flush_write_buf(conn);
if (srd < 0) {
free(buf);
if (srd <= 0) {
rc = SSL_get_error(conn->ssl, srd);
if (rc == SSL_ERROR_WANT_READ)
if (rc == SSL_ERROR_WANT_READ) {
free(buf);
return;
}
}
conn->app_read_cb(conn, buf, srd, conn->app_read_arg);