From 40f446a499ad668f6ecca3944637d09c435b026e Mon Sep 17 00:00:00 2001 From: George Thessalonikefs Date: Fri, 21 Jul 2023 14:02:01 +0200 Subject: [PATCH] - For #857: fix mixed declarations and code. --- testcode/streamtcp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/testcode/streamtcp.c b/testcode/streamtcp.c index 388727383..84d2b65f6 100644 --- a/testcode/streamtcp.c +++ b/testcode/streamtcp.c @@ -386,10 +386,10 @@ send_em(const char* svr, const char* pp2_client, int udp, int usessl, SSL_CTX* ctx = NULL; SSL* ssl = NULL; sldns_buffer* buf = sldns_buffer_new(65553); - if(!buf) fatal_exit("out of memory"); sldns_buffer* proxy_buf = sldns_buffer_new(65553); - if(!proxy_buf) { + if(!buf || !proxy_buf) { sldns_buffer_free(buf); + sldns_buffer_free(proxy_buf); fatal_exit("out of memory"); } pp2_parsed = parse_pp2_client(pp2_client, udp, proxy_buf);