summaryrefslogtreecommitdiff
path: root/vio
diff options
context:
space:
mode:
Diffstat (limited to 'vio')
-rw-r--r--vio/test-ssl.c24
-rw-r--r--vio/test-sslclient.c6
-rw-r--r--vio/test-sslserver.c4
-rw-r--r--vio/vio.c6
-rw-r--r--vio/viosslfactories.c10
-rw-r--r--vio/viotest-ssl.c24
6 files changed, 37 insertions, 37 deletions
diff --git a/vio/test-ssl.c b/vio/test-ssl.c
index 855dc5fbb3e..25a394a1ce0 100644
--- a/vio/test-ssl.c
+++ b/vio/test-ssl.c
@@ -106,8 +106,8 @@ main(int argc, char** argv)
child_pid = fork();
if (child_pid==-1) {
- my_free((uchar*)ssl_acceptor,MYF(0));
- my_free((uchar*)ssl_connector,MYF(0));
+ my_free(ssl_acceptor);
+ my_free(ssl_connector);
fatal_error("fork");
}
if (child_pid==0)
@@ -116,28 +116,28 @@ main(int argc, char** argv)
char xbuf[100];
int r = vio_read(client_vio,xbuf, sizeof(xbuf));
if (r<=0) {
- my_free((uchar*)ssl_acceptor,MYF(0));
- my_free((uchar*)ssl_connector,MYF(0));
+ my_free(ssl_acceptor);
+ my_free(ssl_connector);
fatal_error("client:SSL_read");
}
xbuf[r] = 0;
printf("client:got %s\n", xbuf);
- my_free((uchar*)client_vio,MYF(0));
- my_free((uchar*)ssl_acceptor,MYF(0));
- my_free((uchar*)ssl_connector,MYF(0));
+ my_free(client_vio);
+ my_free(ssl_acceptor);
+ my_free(ssl_connector);
}
else
{
const char* s = "Huhuhuh";
int r = vio_write(server_vio,(uchar*)s, strlen(s));
if (r<=0) {
- my_free((uchar*)ssl_acceptor,MYF(0));
- my_free((uchar*)ssl_connector,MYF(0));
+ my_free(ssl_acceptor);
+ my_free(ssl_connector);
fatal_error("server:SSL_write");
}
- my_free((uchar*)server_vio,MYF(0));
- my_free((uchar*)ssl_acceptor,MYF(0));
- my_free((uchar*)ssl_connector,MYF(0));
+ my_free(server_vio);
+ my_free(ssl_acceptor);
+ my_free(ssl_connector);
}
return 0;
}
diff --git a/vio/test-sslclient.c b/vio/test-sslclient.c
index e1b8461397b..643dcbf2c8e 100644
--- a/vio/test-sslclient.c
+++ b/vio/test-sslclient.c
@@ -84,13 +84,13 @@ main( int argc __attribute__((unused)),
sslconnect(ssl_connector,client_vio,60L);
err = vio_read(client_vio,xbuf, sizeof(xbuf));
if (err<=0) {
- my_free((uchar*)ssl_connector,MYF(0));
+ my_free(ssl_connector);
fatal_error("client:SSL_read");
}
xbuf[err] = 0;
printf("client:got %s\n", xbuf);
- my_free((uchar*)client_vio,MYF(0));
- my_free((uchar*)ssl_connector,MYF(0));
+ my_free(client_vio);
+ my_free(ssl_connector);
return 0;
}
#else /* HAVE_OPENSSL */
diff --git a/vio/test-sslserver.c b/vio/test-sslserver.c
index f55b5bae53a..3123a4def2c 100644
--- a/vio/test-sslserver.c
+++ b/vio/test-sslserver.c
@@ -139,12 +139,12 @@ main(int argc __attribute__((unused)), char** argv)
#if 0
if (err<=0) {
- my_free((uchar*)ssl_acceptor,MYF(0));
+ my_free(ssl_acceptor);
fatal_error("server:SSL_write");
}
#endif /* 0 */
- my_free((uchar*)ssl_acceptor,MYF(0));
+ my_free(ssl_acceptor);
return 0;
}
#else /* HAVE_OPENSSL */
diff --git a/vio/vio.c b/vio/vio.c
index 73dd68b938f..67704a56b22 100644
--- a/vio/vio.c
+++ b/vio/vio.c
@@ -164,7 +164,7 @@ static void vio_init(Vio* vio, enum enum_vio_type type,
void vio_reset(Vio* vio, enum enum_vio_type type,
my_socket sd, HANDLE hPipe, uint flags)
{
- my_free(vio->read_buffer, MYF(MY_ALLOW_ZERO_PTR));
+ my_free(vio->read_buffer);
vio_init(vio, type, sd, hPipe, flags);
}
@@ -263,8 +263,8 @@ void vio_delete(Vio* vio)
if (vio->type != VIO_CLOSED)
vio->vioclose(vio);
- my_free((uchar*) vio->read_buffer, MYF(MY_ALLOW_ZERO_PTR));
- my_free((uchar*) vio,MYF(0));
+ my_free(vio->read_buffer);
+ my_free(vio);
}
diff --git a/vio/viosslfactories.c b/vio/viosslfactories.c
index d0a0a69f70b..2a38bbdfd57 100644
--- a/vio/viosslfactories.c
+++ b/vio/viosslfactories.c
@@ -224,7 +224,7 @@ new_VioSSLFd(const char *key_file, const char *cert_file,
*error= SSL_INITERR_MEMFAIL;
DBUG_PRINT("error", ("%s", sslGetErrString(*error)));
report_errors();
- my_free((void*)ssl_fd,MYF(0));
+ my_free(ssl_fd);
DBUG_RETURN(0);
}
@@ -240,7 +240,7 @@ new_VioSSLFd(const char *key_file, const char *cert_file,
DBUG_PRINT("error", ("%s", sslGetErrString(*error)));
report_errors();
SSL_CTX_free(ssl_fd->ssl_context);
- my_free((void*)ssl_fd,MYF(0));
+ my_free(ssl_fd);
DBUG_RETURN(0);
}
@@ -254,7 +254,7 @@ new_VioSSLFd(const char *key_file, const char *cert_file,
DBUG_PRINT("error", ("%s", sslGetErrString(*error)));
report_errors();
SSL_CTX_free(ssl_fd->ssl_context);
- my_free((void*)ssl_fd,MYF(0));
+ my_free(ssl_fd);
DBUG_RETURN(0);
}
}
@@ -264,7 +264,7 @@ new_VioSSLFd(const char *key_file, const char *cert_file,
DBUG_PRINT("error", ("vio_set_cert_stuff failed"));
report_errors();
SSL_CTX_free(ssl_fd->ssl_context);
- my_free((void*)ssl_fd,MYF(0));
+ my_free(ssl_fd);
DBUG_RETURN(0);
}
@@ -344,6 +344,6 @@ new_VioSSLAcceptorFd(const char *key_file, const char *cert_file,
void free_vio_ssl_acceptor_fd(struct st_VioSSLFd *fd)
{
SSL_CTX_free(fd->ssl_context);
- my_free((uchar*) fd, MYF(0));
+ my_free(fd);
}
#endif /* HAVE_OPENSSL */
diff --git a/vio/viotest-ssl.c b/vio/viotest-ssl.c
index b8abbac4ed6..5c68e861d2a 100644
--- a/vio/viotest-ssl.c
+++ b/vio/viotest-ssl.c
@@ -106,8 +106,8 @@ int main(int argc, char **argv)
child_pid = fork();
if (child_pid==-1)
{
- my_free((uchar*)ssl_acceptor,MYF(0));
- my_free((uchar*)ssl_connector,MYF(0));
+ my_free(ssl_acceptor);
+ my_free(ssl_connector);
fatal_error("fork");
}
if (child_pid==0)
@@ -116,15 +116,15 @@ int main(int argc, char **argv)
char xbuf[100];
int r = vio_ssl_read(client_vio,xbuf, sizeof(xbuf));
if (r<=0) {
- my_free((uchar*)ssl_acceptor,MYF(0));
- my_free((uchar*)ssl_connector,MYF(0));
+ my_free(ssl_acceptor);
+ my_free(ssl_connector);
fatal_error("client:SSL_read");
}
xbuf[r] = 0;
printf("client:got %s\n", xbuf);
- my_free((uchar*)client_vio,MYF(0));
- my_free((uchar*)ssl_acceptor,MYF(0));
- my_free((uchar*)ssl_connector,MYF(0));
+ my_free(client_vio);
+ my_free(ssl_acceptor);
+ my_free(ssl_connector);
sleep(1);
}
else
@@ -132,13 +132,13 @@ int main(int argc, char **argv)
const char* s = "Huhuhuh";
int r = vio_ssl_write(server_vio,(uchar*)s, strlen(s));
if (r<=0) {
- my_free((uchar*)ssl_acceptor,MYF(0));
- my_free((uchar*)ssl_connector,MYF(0));
+ my_free(ssl_acceptor);
+ my_free(ssl_connector);
fatal_error("server:SSL_write");
}
- my_free((uchar*)server_vio,MYF(0));
- my_free((uchar*)ssl_acceptor,MYF(0));
- my_free((uchar*)ssl_connector,MYF(0));
+ my_free(server_vio);
+ my_free(ssl_acceptor);
+ my_free(ssl_connector);
sleep(1);
}
return 0;