From b6312c4b5ab04be3f89b0d46c5546baa9feb542e Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sat, 28 Apr 2018 17:11:00 +0200 Subject: blalba --- src/Database.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/Database.cpp b/src/Database.cpp index 7281025..492cc7d 100644 --- a/src/Database.cpp +++ b/src/Database.cpp @@ -344,7 +344,7 @@ namespace odhtdb Hash requestDataHash(stagedAddObject.data, stagedAddObject.size); DataView encryptedDataView((char*)requestData.data + serializer.getBuffer().size(), requestData.size - serializer.getBuffer().size()); databaseStorage.appendStorage(*nodeInfo.getRequestHash(), requestDataHash, DatabaseOperation::ADD_DATA, userToPerformActionWith, timestampMicroseconds, (u8*)stagedAddObject.data, stagedAddObject.size, encryptedDataView); - delete (char*)requestData.data; + delete[] (char*)requestData.data; stagedAddObjects.emplace_back(make_unique(stagedAddObject, nodeInfo.getRequestHash())); } @@ -435,13 +435,13 @@ namespace odhtdb for(const auto &stagedObject : stagedCreateObjects) { - free(stagedObject->data.data); + delete[] (char*)stagedObject->data.data; } stagedCreateObjects.clear(); for(const auto &stagedObject : stagedAddObjects) { - free(stagedObject->data.data); + delete[] (char*)stagedObject->data.data; } stagedAddObjects.clear(); -- cgit v1.2.3