fix cloned string cleanup

This commit is contained in:
2026-02-17 02:03:40 -05:00
parent a6bf357228
commit 225a1533cc
9 changed files with 113 additions and 59 deletions

View File

@@ -16,6 +16,7 @@
package dynamodb
import "core:encoding/json"
import "core:strings"
// ============================================================================
// Condition Evaluation Result
@@ -54,7 +55,7 @@ parse_condition_expression_string :: proc(request_body: []byte) -> (expr: string
return
}
expr = string(ce_str)
expr = strings.clone(string(ce_str))
ok = true
return
}
@@ -88,6 +89,7 @@ evaluate_condition_expression :: proc(
if !has_condition {
return .Passed // No condition → always pass
}
defer delete(condition_str)
// Parse the condition into a filter tree (same grammar as FilterExpression)
filter_node, parse_ok := parse_filter_expression(condition_str, attr_names, attr_values)