fix leaks
This commit is contained in:
@@ -440,7 +440,13 @@ parse_expression_attribute_values :: proc(request_body: []byte) -> (map[string]A
|
||||
for key, val in values_obj {
|
||||
attr, attr_ok := parse_attribute_value(val)
|
||||
if !attr_ok {
|
||||
continue
|
||||
// Clean up already-parsed values before returning error
|
||||
for k, &v in result {
|
||||
attr_value_destroy(&v)
|
||||
delete(k)
|
||||
}
|
||||
delete(result)
|
||||
return make(map[string]Attribute_Value), false
|
||||
}
|
||||
result[strings.clone(key)] = attr
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user