mirror of
https://github.com/MariaDB/server.git
synced 2025-01-26 16:54:15 +01:00
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.
This commit is contained in:
parent
8a376ae237
commit
5f267b47de
2 changed files with 7 additions and 1 deletions
|
@ -357,6 +357,7 @@ ARCHIVE_SHARE *ha_archive::get_share(const char *table_name, int *rc)
|
|||
{
|
||||
*rc= my_errno ? my_errno : -1;
|
||||
pthread_mutex_unlock(&archive_mutex);
|
||||
pthread_mutex_destroy(&share->mutex);
|
||||
my_free(share, MYF(0));
|
||||
DBUG_RETURN(NULL);
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue