diff --git a/src/dbzero/bindings/python/PyInternalAPI.cpp b/src/dbzero/bindings/python/PyInternalAPI.cpp index 8a8df3d1..55317a41 100644 --- a/src/dbzero/bindings/python/PyInternalAPI.cpp +++ b/src/dbzero/bindings/python/PyInternalAPI.cpp @@ -1040,15 +1040,13 @@ namespace db0::python auto result = Py_OWN(tryCopyPrefixImpl(*storage, output_file_name, page_io_step_size, meta_io_step_size)); storage->close(); return result.steal(); - if (!result) { - return nullptr; - } } catch (...) { if (storage) { storage->close(); } throw; } + return nullptr; } template PyObject *getMaterializedMemoObject(MemoObject *); diff --git a/src/dbzero/core/memory/utils.hpp b/src/dbzero/core/memory/utils.hpp index 75099b23..b60107c3 100644 --- a/src/dbzero/core/memory/utils.hpp +++ b/src/dbzero/core/memory/utils.hpp @@ -6,6 +6,7 @@ #include #include #include +#include #include "config.hpp" #include "Address.hpp" #include