summaryrefslogtreecommitdiff
path: root/vio
diff options
context:
space:
mode:
authorVladislav Vaintroub <wlad@montyprogram.com>2011-05-14 18:42:07 +0200
committerVladislav Vaintroub <wlad@montyprogram.com>2011-05-14 18:42:07 +0200
commit5f267b47de4aee6c078c21368bfbf359fb5e3ab7 (patch)
tree78fdcba43b4862369a2a1a85617e6fa31b3f1830 /vio
parent8a376ae237f108bdff96d15bfffd5231d1dd78df (diff)
downloadmariadb-git-5f267b47de4aee6c078c21368bfbf359fb5e3ab7.tar.gz
Fix bugs found by application verifier :
- Fix active lock in freed memory in ha_archive (share mutex was not released prior to free()) - Do not attempt vio_fastsend or vio_keepalive on named pipes and shared memory.
Diffstat (limited to 'vio')
-rw-r--r--vio/viosocket.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/vio/viosocket.c b/vio/viosocket.c
index f47a7a10ad2..f780764cbe4 100644
--- a/vio/viosocket.c
+++ b/vio/viosocket.c
@@ -193,6 +193,11 @@ int vio_fastsend(Vio * vio __attribute__((unused)))
int r=0;
DBUG_ENTER("vio_fastsend");
+ if (vio->type == VIO_TYPE_NAMEDPIPE ||vio->type == VIO_TYPE_SHARED_MEMORY)
+ {
+ DBUG_RETURN(0);
+ }
+
#if defined(IPTOS_THROUGHPUT)
{
int tos = IPTOS_THROUGHPUT;
@@ -228,7 +233,7 @@ int vio_keepalive(Vio* vio, my_bool set_keep_alive)
DBUG_ENTER("vio_keepalive");
DBUG_PRINT("enter", ("sd: %d set_keep_alive: %d", vio->sd, (int)
set_keep_alive));
- if (vio->type != VIO_TYPE_NAMEDPIPE)
+ if (vio->type != VIO_TYPE_NAMEDPIPE && vio->type != VIO_TYPE_SHARED_MEMORY)
{
if (set_keep_alive)
opt = 1;