]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- For #857: fix mixed declarations and code.
authorGeorge Thessalonikefs <george@nlnetlabs.nl>
Fri, 21 Jul 2023 12:02:01 +0000 (14:02 +0200)
committerGeorge Thessalonikefs <george@nlnetlabs.nl>
Fri, 21 Jul 2023 12:02:01 +0000 (14:02 +0200)
testcode/streamtcp.c

index 38872738303454056748a7e0929f4a416f31780d..84d2b65f6f5c958a90832e344d0015026243b575 100644 (file)
@@ -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);