From: Timo Sirainen Date: Fri, 16 Jun 2023 12:20:23 +0000 (+0300) Subject: lib-ssl-iostream: test-iostream-ssl - Avoid ssl_iostream_settings_dup() X-Git-Tag: 2.4.1~1499 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a2167dc8a02862ae08db17b5f3bc2a31ecae92e4;p=thirdparty%2Fdovecot%2Fcore.git lib-ssl-iostream: test-iostream-ssl - Avoid ssl_iostream_settings_dup() This is the only place still using the function, and it's not really necessary. --- diff --git a/src/lib-ssl-iostream/test-iostream-ssl.c b/src/lib-ssl-iostream/test-iostream-ssl.c index 75e321dbb2..ed6893accb 100644 --- a/src/lib-ssl-iostream/test-iostream-ssl.c +++ b/src/lib-ssl-iostream/test-iostream-ssl.c @@ -158,7 +158,8 @@ create_test_endpoint(int fd, const struct ssl_iostream_settings *set) ep->input = i_stream_create_fd(ep->fd, 512); ep->output = o_stream_create_fd(ep->fd, 1024); o_stream_uncork(ep->output); - ep->set = ssl_iostream_settings_dup(pool, set); + /* We assume here that strings continue to be valid pointers */ + ep->set = p_memdup(pool, set, sizeof(*set)); ep->last_write = buffer_create_dynamic(pool, 1024); return ep; }