fix more tingz
This commit is contained in:
@@ -827,7 +827,7 @@ parse_filter_expression_string :: proc(request_body: []byte) -> (expr: string, o
|
|||||||
// ============================================================================
|
// ============================================================================
|
||||||
|
|
||||||
make_filter_node :: proc() -> ^Filter_Node {
|
make_filter_node :: proc() -> ^Filter_Node {
|
||||||
node := make_filter_node()
|
node := new(Filter_Node)
|
||||||
node.allocator = context.allocator
|
node.allocator = context.allocator
|
||||||
return node
|
return node
|
||||||
}
|
}
|
||||||
@@ -193,10 +193,14 @@ remove_table_lock :: proc(engine: ^Storage_Engine, table_name: string) {
|
|||||||
sync.mutex_lock(&engine.table_locks_mutex)
|
sync.mutex_lock(&engine.table_locks_mutex)
|
||||||
defer sync.mutex_unlock(&engine.table_locks_mutex)
|
defer sync.mutex_unlock(&engine.table_locks_mutex)
|
||||||
|
|
||||||
if lock, found := engine.table_locks[table_name]; found {
|
// Find the actual heap-allocated key string from the map
|
||||||
delete(table_name, engine.allocator)
|
for key, lock in engine.table_locks {
|
||||||
free(lock, engine.allocator)
|
if key == table_name {
|
||||||
delete_key(&engine.table_locks, table_name)
|
delete_key(&engine.table_locks, key)
|
||||||
|
delete(key, engine.allocator) // free the map's owned key!
|
||||||
|
free(lock, engine.allocator)
|
||||||
|
break
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user