From 215555956513ba0d24707980da429e3c4a4a37a6 Mon Sep 17 00:00:00 2001 From: Frederic Suter Date: Fri, 24 Mar 2017 13:28:35 +0100 Subject: [PATCH] match new with delete in fact --- src/surf/HostImpl.cpp | 2 +- src/surf/storage_interface.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/surf/HostImpl.cpp b/src/surf/HostImpl.cpp index 81faf9574b..9e5602fd0c 100644 --- a/src/surf/HostImpl.cpp +++ b/src/surf/HostImpl.cpp @@ -289,7 +289,7 @@ int HostImpl::fileMove(surf_file_t fd, const char* fullpath) std::map* content = findStorageOnMountList(fd->mount)->content_; if (content->find(fd->name) != content->end()) { // src file exists sg_size_t* psize = content->at(std::string(fd->name)); - sg_size_t* new_psize = xbt_new(sg_size_t, 1); + sg_size_t* new_psize = new sg_size_t; *new_psize = *psize; delete psize; content->erase(fd->name); diff --git a/src/surf/storage_interface.cpp b/src/surf/storage_interface.cpp index 831e5143d0..799f67c41d 100644 --- a/src/surf/storage_interface.cpp +++ b/src/surf/storage_interface.cpp @@ -78,7 +78,7 @@ Storage::~Storage(){ storageDestructedCallbacks(this); if (content_ != nullptr) { for (auto entry : *content_) - free(entry.second); + delete entry.second; delete content_; } free(typeId_); -- 2.30.2