From: George Thessalonikefs Date: Fri, 21 Jul 2023 12:02:01 +0000 (+0200) Subject: - For #857: fix mixed declarations and code. X-Git-Tag: release-1.18.0rc1~24^2~6^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=40f446a499ad668f6ecca3944637d09c435b026e;p=thirdparty%2Funbound.git - For #857: fix mixed declarations and code. --- 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);