aboutsummaryrefslogtreecommitdiff
path: root/engines/glk/archetype/linked_list.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/glk/archetype/linked_list.cpp')
-rw-r--r--engines/glk/archetype/linked_list.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/glk/archetype/linked_list.cpp b/engines/glk/archetype/linked_list.cpp
index bc4719ca48..eef55b4e01 100644
--- a/engines/glk/archetype/linked_list.cpp
+++ b/engines/glk/archetype/linked_list.cpp
@@ -27,7 +27,7 @@ namespace Glk {
namespace Archetype {
void new_list(ListType &the_list) {
- the_list = (ListType)malloc(sizeof(NodeType));
+ the_list = new NodeType();
add_bytes(sizeof(NodeType));
the_list->key = 0;
the_list->data = nullptr;
@@ -40,7 +40,7 @@ void dispose_list(ListType &the_list) {
axe = theNode;
theNode = theNode->next;
add_bytes(-(int)sizeof(*axe));
- free(axe);
+ delete axe;
}
}