From a6bf357228751d5711dc3dc913559e299978ef4a Mon Sep 17 00:00:00 2001 From: biondizzle Date: Mon, 16 Feb 2026 18:50:02 -0500 Subject: [PATCH] fix more tingz --- dynamodb/filter.odin | 2 +- dynamodb/storage.odin | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/dynamodb/filter.odin b/dynamodb/filter.odin index d59d394..c21444f 100644 --- a/dynamodb/filter.odin +++ b/dynamodb/filter.odin @@ -827,7 +827,7 @@ parse_filter_expression_string :: proc(request_body: []byte) -> (expr: string, o // ============================================================================ make_filter_node :: proc() -> ^Filter_Node { - node := make_filter_node() + node := new(Filter_Node) node.allocator = context.allocator return node } \ No newline at end of file diff --git a/dynamodb/storage.odin b/dynamodb/storage.odin index 3416d7e..3907cf7 100644 --- a/dynamodb/storage.odin +++ b/dynamodb/storage.odin @@ -193,10 +193,14 @@ remove_table_lock :: proc(engine: ^Storage_Engine, table_name: string) { sync.mutex_lock(&engine.table_locks_mutex) defer sync.mutex_unlock(&engine.table_locks_mutex) - if lock, found := engine.table_locks[table_name]; found { - delete(table_name, engine.allocator) - free(lock, engine.allocator) - delete_key(&engine.table_locks, table_name) + // Find the actual heap-allocated key string from the map + for key, lock in engine.table_locks { + if key == table_name { + delete_key(&engine.table_locks, key) + delete(key, engine.allocator) // free the map's owned key! + free(lock, engine.allocator) + break + } } }