Free the compression methods in s_server and s_client
authorMatt Caswell <matt@openssl.org>
Mon, 27 Mar 2017 09:21:59 +0000 (10:21 +0100)
committerMatt Caswell <matt@openssl.org>
Wed, 29 Mar 2017 09:17:25 +0000 (10:17 +0100)
This causes a minor (64 bytes on my machine) mem leak in s_server/s_client.

Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3040)

apps/s_client.c
apps/s_server.c

index 3cabfb50ab8ba4478ebfc3d27e2e5b3ae2c8eaea..85c1b6b579445aa1fcefe09043c7f3187ed11db2 100644 (file)
@@ -2132,6 +2132,7 @@ int MAIN(int argc, char **argv)
         BIO_free(bio_c_msg);
         bio_c_msg = NULL;
     }
+    SSL_COMP_free_compression_methods();
     apps_shutdown();
     OPENSSL_EXIT(ret);
 }
index b561cf3a362bf9d9d15670da5688cbe0327163d8..d75871386928f593fde94d74c91bd22bca6ebdc0 100644 (file)
@@ -2132,6 +2132,7 @@ int MAIN(int argc, char *argv[])
         BIO_free(bio_s_msg);
         bio_s_msg = NULL;
     }
+    SSL_COMP_free_compression_methods();
     apps_shutdown();
     OPENSSL_EXIT(ret);
 }