diff --git a/src/sysc/utils/sc_temporary.h b/src/sysc/utils/sc_temporary.h index 152b0f913..86cf9e048 100644 --- a/src/sysc/utils/sc_temporary.h +++ b/src/sysc/utils/sc_temporary.h @@ -94,6 +94,7 @@ class SC_API sc_byte_heap { { delete [] m_bgn_p; m_bgn_p = new char[heap_size]; + std::memset(m_bgn_p, 0, heap_size); m_end_p = &m_bgn_p[heap_size]; m_next_p = m_bgn_p; } diff --git a/src/tlm_utils/simple_target_socket.h b/src/tlm_utils/simple_target_socket.h index 7e4c3a197..d39dcee65 100644 --- a/src/tlm_utils/simple_target_socket.h +++ b/src/tlm_utils/simple_target_socket.h @@ -548,7 +548,7 @@ class simple_target_socket_b bw_process m_bw_process; std::map m_pending_trans; sc_core::sc_event m_end_request; - transaction_type* m_current_transaction; + transaction_type* m_current_transaction = NULL; }; template< typename MODULE, unsigned int BUSWIDTH = 32