diff options
author | Peter Powell <petpow@saberuk.com> | 2019-08-13 13:35:05 +0100 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2019-08-13 15:02:25 +0100 |
commit | 0827c5c7425a17b6a569a9f706b5b3dea8fa345a (patch) | |
tree | 0e8ce47f63feed43378fdc14cc656b8e1edaf98d /src | |
parent | 703ba72071b970caaa7554b1e58a13def57694dc (diff) |
Free StringExtItem and SimpleExtItem values correctly.
Diffstat (limited to 'src')
-rw-r--r-- | src/base.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/base.cpp b/src/base.cpp index b4ea09bc9..ebd5214db 100644 --- a/src/base.cpp +++ b/src/base.cpp @@ -369,13 +369,13 @@ void StringExtItem::FromNetwork(Extensible* container, const std::string& value) void StringExtItem::set(Extensible* container, const std::string& value) { void* old = set_raw(container, new std::string(value)); - delete static_cast<std::string*>(old); + free(container, old); } void StringExtItem::unset(Extensible* container) { void* old = unset_raw(container); - delete static_cast<std::string*>(old); + free(container, old); } void StringExtItem::free(Extensible* container, void* item) |