diff options
author | Hugo Landau <hlandau@openssl.org> | 2023-08-09 17:46:33 +0100 |
---|---|---|
committer | Hugo Landau <hlandau@openssl.org> | 2023-09-01 10:45:34 +0100 |
commit | b1cb0675e5c76c6dd78863e6857b5456718da7b5 (patch) | |
tree | 069f0190cffa9cff310cc0aaa489cb69471600e8 /doc/designs | |
parent | 62665fc2430cb3d3c9e59a133e67ab9941222017 (diff) |
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)
Diffstat (limited to 'doc/designs')
-rw-r--r-- | doc/designs/ddd/ddd-06-mem-uv.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/doc/designs/ddd/ddd-06-mem-uv.c b/doc/designs/ddd/ddd-06-mem-uv.c index f912f68bdf..7af5a11105 100644 --- a/doc/designs/ddd/ddd-06-mem-uv.c +++ b/doc/designs/ddd/ddd-06-mem-uv.c @@ -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); |