Skip to content

Commit

Permalink
stack-use-after-scope fix (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxim Andronov committed Jul 20, 2021
1 parent d4b9c5f commit 0edf5e8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion inference-engine/src/mkldnn_plugin/mkldnn_memory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,8 @@ std::string MKLDNNMemory::formatToString(memory::format_tag fmt) {

void *MKLDNNMemory::GetPtr() const {
auto ptr = static_cast<uint8_t*>(GetData());
mkldnn::impl::memory_desc_wrapper wrapper(GetDescriptor().data);
auto md = GetDescriptor().data;
mkldnn::impl::memory_desc_wrapper wrapper(md);
ptr += wrapper.offset0() * wrapper.data_type_size();
return ptr;
}
Expand Down

0 comments on commit 0edf5e8

Please sign in to comment.