Properly own the duplicated string
[openssl.git] / crypto / bio / bss_sock.c
index 8d87c8c338809e807f6116e4a902a7d0ed839e5e..c1f76a24a799533fcb5711a5b1245466b25ac6ae 100644 (file)
@@ -58,6 +58,7 @@
 #include <stdio.h>
 #include <errno.h>
 #define USE_SOCKETS
+#include "bio_lcl.h"
 #include "internal/cryptlib.h"
 
 #ifndef OPENSSL_NO_SOCK
@@ -78,7 +79,7 @@ static int sock_new(BIO *h);
 static int sock_free(BIO *data);
 int BIO_sock_should_retry(int s);
 
-static BIO_METHOD methods_sockp = {
+static const BIO_METHOD methods_sockp = {
     BIO_TYPE_SOCKET,
     "socket",
     sock_write,
@@ -91,7 +92,7 @@ static BIO_METHOD methods_sockp = {
     NULL,
 };
 
-BIO_METHOD *BIO_s_socket(void)
+const BIO_METHOD *BIO_s_socket(void)
 {
     return (&methods_sockp);
 }