Skip to content

Commit

Permalink
Handle NULL flow in FLOW_LOCK.
Browse files Browse the repository at this point in the history
Change-Id: I8a202aca7dc7a7fd1bf86509b3509697b5e51f62
Closes-bug: #1552203
  • Loading branch information
manishsing authored and opencontrail-ci-admin committed Mar 23, 2016
1 parent d34c84d commit 54ee554
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/vnsw/agent/pkt/flow_table.cc
Expand Up @@ -53,8 +53,9 @@ const uint32_t FlowEntryFreeList::kMinThreshold;
SandeshTraceBufferPtr FlowTraceBuf(SandeshTraceBufferCreate("Flow", 5000));

#define FLOW_LOCK(flow, rflow) \
tbb::mutex tmp_mutex, *mutex_ptr_1, *mutex_ptr_2; \
GetMutexSeq(flow->mutex(), rflow ? rflow->mutex() : tmp_mutex, \
tbb::mutex tmp_mutex1, tmp_mutex2, *mutex_ptr_1, *mutex_ptr_2; \
GetMutexSeq(flow ? flow->mutex() : tmp_mutex1, \
rflow ? rflow->mutex() : tmp_mutex2, \
&mutex_ptr_1, &mutex_ptr_2); \
tbb::mutex::scoped_lock lock1(*mutex_ptr_1); \
tbb::mutex::scoped_lock lock2(*mutex_ptr_2);
Expand Down

0 comments on commit 54ee554

Please sign in to comment.