Skip to content

Commit

Permalink
Fix array delete and header guard (#1327)
Browse files Browse the repository at this point in the history
  • Loading branch information
qiluo-msft committed Jun 19, 2020
1 parent cbfe521 commit 17a2f93
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion fpmsyncd/fpmlink.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions mclagsyncd/mclaglink.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions orchagent/notifications.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#pragma once

extern "C" {
#include "sai.h"
}
Expand Down
2 changes: 2 additions & 0 deletions orchagent/notifier.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#pragma once

#include "orch.h"

class Notifier : public Executor {
Expand Down
2 changes: 2 additions & 0 deletions tests/mock_tests/mock_table.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#pragma once

#include "table.h"

namespace testing_db
Expand Down

0 comments on commit 17a2f93

Please sign in to comment.