Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
None
-
None
Description
PyErr_SetObject() takes its own reference to the value, so the one held by mariadb_throw_exception() and mariadb_exception_connection_gone() in mariadb_exception.c has to be dropped. It never is, so each raised exception is retained for the life of the process, along with its errmsg/msg/sqlstate/errno attributes.
Any application that hits errors in a loop grows without bound. Both functions also leak ErrorMsg, ErrorNo and SqlState on the return taken when the exception object can't be constructed.
2.0 already has both fixes.