Skip to content

Commit

Permalink
Fix for CONC-132: Fix leak in connection pool
Browse files Browse the repository at this point in the history
When closing a connection pool the allocated buffer for pool_name
was not freed in a proper way.
  • Loading branch information
9EOR9 committed Nov 23, 2020
1 parent 35a1235 commit 0f0468a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mariadb/mariadb_pooling.c
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,8 @@ MrdbPool_close(MrdbPool *self)
{
PyDict_DelItemString(cnx_pool, self->pool_name);
}
self->pool_name= NULL;
MARIADB_FREE_MEM(self->pool_name);
self->pool_name= 0;
}
pthread_mutex_unlock(&self->lock);
pthread_mutex_destroy(&self->lock);
Expand Down

0 comments on commit 0f0468a

Please sign in to comment.