Skip to content

Commit 4e06fb1

Browse files
committed
Bug fix (oversight). Only valgrind got this one.
1 parent 0e50c45 commit 4e06fb1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/pybind11/pytypes.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ struct error_fetch_and_normalize {
452452
std::string result;
453453
std::string message_error_string;
454454
if (m_value) {
455-
auto value_str = reinterpret_borrow<object>(PyObject_Str(m_value.ptr()));
455+
auto value_str = reinterpret_steal<object>(PyObject_Str(m_value.ptr()));
456456
if (!value_str) {
457457
message_error_string = detail::error_string();
458458
result = "<MESSAGE UNAVAILABLE DUE TO ANOTHER EXCEPTION>";

0 commit comments

Comments
 (0)