diff --git a/fpmsyncd/fpmlink.cpp b/fpmsyncd/fpmlink.cpp index 464f96522175..28772459f679 100644 --- a/fpmsyncd/fpmlink.cpp +++ b/fpmsyncd/fpmlink.cpp @@ -61,7 +61,7 @@ FpmLink::FpmLink(unsigned short port) : FpmLink::~FpmLink() { - delete m_messageBuffer; + delete[] m_messageBuffer; if (m_connected) close(m_connection_socket); if (m_server_up) diff --git a/mclagsyncd/mclaglink.cpp b/mclagsyncd/mclaglink.cpp index 369dff08f0d4..d5e38fe57806 100644 --- a/mclagsyncd/mclaglink.cpp +++ b/mclagsyncd/mclaglink.cpp @@ -632,8 +632,8 @@ MclagLink::MclagLink(int port) : MclagLink::~MclagLink() { - delete m_messageBuffer; - delete m_messageBuffer_send; + delete[] m_messageBuffer; + delete[] m_messageBuffer_send; if (m_connected) close(m_connection_socket); if (m_server_up) diff --git a/orchagent/notifications.h b/orchagent/notifications.h index 961e2eae9fd8..2ee207ebfaf1 100644 --- a/orchagent/notifications.h +++ b/orchagent/notifications.h @@ -1,3 +1,5 @@ +#pragma once + extern "C" { #include "sai.h" } diff --git a/orchagent/notifier.h b/orchagent/notifier.h index 2df9c7ff6c84..36416ab7f0b7 100644 --- a/orchagent/notifier.h +++ b/orchagent/notifier.h @@ -1,3 +1,5 @@ +#pragma once + #include "orch.h" class Notifier : public Executor { diff --git a/tests/mock_tests/mock_table.h b/tests/mock_tests/mock_table.h index bf8a4bdef610..88aed225ea9f 100644 --- a/tests/mock_tests/mock_table.h +++ b/tests/mock_tests/mock_table.h @@ -1,3 +1,5 @@ +#pragma once + #include "table.h" namespace testing_db