the error raised for non-existent attribute didn't free
the "name" string, causing a leak.
Fixed a memory leak in the C extensions which could occur when calling upon
named members of :class:`.Row` when the member does not exist under Python
3; in particular this could occur during numpy transformations when it
attempts to call members such as ``.__array__``, but the issue was
surrounding any ``AttributeError`` thrown by the :class:`.Row` object. This
issue does not apply to version 2.0 which has already transitioned to
Cython. Thanks much to Sebastian Berg for identifying the problem.
Fixes: #7875
Change-Id: I444026a877ea1473a5ffac592c7f36ed6f4b563e
--- /dev/null
+.. change::
+ :tags: bug, engine
+ :tickets: 7875
+
+ Fixed a memory leak in the C extensions which could occur when calling upon
+ named members of :class:`.Row` when the member does not exist under Python
+ 3; in particular this could occur during numpy transformations when it
+ attempts to call members such as ``.__array__``, but the issue was
+ surrounding any ``AttributeError`` thrown by the :class:`.Row` object. This
+ issue does not apply to version 2.0 which has already transitioned to
+ Cython. Thanks much to Sebastian Berg for identifying the problem.
+
"Could not locate column in row for column '%.200s'",
PyBytes_AS_STRING(err_bytes)
);
+ Py_DECREF(err_bytes);
#else
PyErr_Format(
PyExc_AttributeError,