[CONPY-83] DB Connection pool Created: 2020-07-07  Updated: 2020-07-07  Resolved: 2020-07-07

Status: Closed
Project: MariaDB Connector/Python
Component/s: Generic
Affects Version/s: 1.0.0
Fix Version/s: 1.0.1

Type: Bug Priority: Major
Reporter: Stefko Assignee: Georg Richter
Resolution: Fixed Votes: 0
Labels: None


 Description   

In mariadb_connection.c: MrdbConnection_close does not increment references to Py_None. This leads to de-reference a null object error after some number of get_connection/close connection of the pool.

Replacing (line 580)
pthread_mutex_unlock(&self->pool->lock);
return Py_None;

with
pthread_mutex_unlock(&self->pool->lock);
Py_INCREF(Py_None);
return Py_None;

fixes the problem.



 Comments   
Comment by Georg Richter [ 2020-07-07 ]

Thank you for your bug report. This issue has beed fixed in commit ee1e81afa5c16d398f75e78f9d7be97343a57b81

Generated at Thu Feb 08 03:30:07 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.