Skip to content

Commit

Permalink
fix uninitialized object (#26753)
Browse files Browse the repository at this point in the history
### Details:
 - *avoid member dangling by setting default value*
 - *...*

### Tickets:
 - *153060*
  • Loading branch information
xczhai authored Sep 26, 2024
1 parent d717770 commit 87b84db
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/plugins/intel_cpu/src/sub_memory_manager.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,15 @@ namespace intel_cpu {
class SubMemoryManager {
public:
struct MemoryInfo {
void* send_buf;
bool flag;
bool last_used;
void* send_buf = nullptr;
bool flag = false;
bool last_used = false;
};

SubMemoryManager(int num_sub_streams) {
assert(num_sub_streams);
_num_sub_streams = num_sub_streams;
MemoryInfo memory_info;
memory_info.flag = false;
memory_info.last_used = false;
std::vector<MemoryInfo> memorys;
memorys.assign(_num_sub_streams, memory_info);
_memorys_table.assign(2, memorys);
Expand Down

0 comments on commit 87b84db

Please sign in to comment.