aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordec05eba <0xdec05eba@gmail.com>2018-04-28 17:11:00 +0200
committerdec05eba <0xdec05eba@gmail.com>2018-04-28 17:11:07 +0200
commit92e22dd7f1f918ef92a31f5526bac263ef409f18 (patch)
treed5da73194928e02046cceff6e8b5023c195ec1bf /src
parent97fd90f4c3319e3e789416155c1a462ab179875c (diff)
blalba
Diffstat (limited to 'src')
-rw-r--r--src/Database.cpp6
1 files changed, 3 insertions, 3 deletions
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<StagedObject>(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();