Skip to content

Commit

Permalink
fix Unpack example from quickstart segfaults #1100
Browse files Browse the repository at this point in the history
  • Loading branch information
Arenoros committed Jan 27, 2024
1 parent b87dfc7 commit 4858eaf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/msgpack/v1/detail/cpp03_zone.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ class zone {
inline zone::zone(size_t chunk_size):m_chunk_size(chunk_size), m_chunk_list(MSGPACK_NULLPTR) {}

inline zone::~zone() {
m_finalizer_array.~finalizer_array();
m_finalizer_array.clear();
if(m_chunk_list) {
m_chunk_list->~chunk_list();
::free(m_chunk_list);
Expand Down
2 changes: 1 addition & 1 deletion include/msgpack/v1/detail/cpp11_zone.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ class zone {
inline zone::zone(size_t chunk_size):m_chunk_size(chunk_size), m_chunk_list(MSGPACK_NULLPTR) {}

inline zone::~zone() {
m_finalizer_array.~finalizer_array();
m_finalizer_array.clear();
if(m_chunk_list) {
m_chunk_list->~chunk_list();
::free(m_chunk_list);
Expand Down

0 comments on commit 4858eaf

Please sign in to comment.