Plug a memleak caused by an extra bump of a refcount
authortb <tb@openbsd.org>
Fri, 14 Apr 2023 14:23:05 +0000 (14:23 +0000)
committertb <tb@openbsd.org>
Fri, 14 Apr 2023 14:23:05 +0000 (14:23 +0000)
SSL_set_session() should really be called SSL_set1_session()...

regress/lib/libssl/exporter/exportertest.c

index 66155bd..252fcb0 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: exportertest.c,v 1.2 2022/11/26 16:08:56 tb Exp $ */
+/* $OpenBSD: exportertest.c,v 1.3 2023/04/14 14:23:05 tb Exp $ */
 /*
  * Copyright (c) 2022 Joel Sing <jsing@openbsd.org>
  *
@@ -558,7 +558,6 @@ exporter_test(size_t test_no, const struct exporter_test *et)
                fprintf(stderr, "FAIL: SSL_set_session\n");
                goto failure;
        }
-       SSL_SESSION_up_ref(ssl_session);
 
        memcpy(ssl_session->master_key, et->master_key,
            sizeof(ssl_session->master_key));