| 2094 | } |
| 2095 | |
| 2096 | static void free_where(cbm_where_clause_t *w) { |
| 2097 | if (!w) { |
| 2098 | return; |
| 2099 | } |
| 2100 | expr_free(w->root); |
| 2101 | for (int i = 0; i < w->count; i++) { |
| 2102 | safe_str_free(&w->conditions[i].variable); |
| 2103 | safe_str_free(&w->conditions[i].property); |
| 2104 | safe_str_free(&w->conditions[i].op); |
| 2105 | safe_str_free(&w->conditions[i].value); |
| 2106 | for (int j = 0; j < w->conditions[i].in_value_count; j++) { |
| 2107 | safe_str_free(&w->conditions[i].in_values[j]); |
| 2108 | } |
| 2109 | free(w->conditions[i].in_values); |
| 2110 | safe_str_free(&w->conditions[i].func); |
| 2111 | func_args_free(w->conditions[i].args, w->conditions[i].arg_count); |
| 2112 | } |
| 2113 | free(w->conditions); |
| 2114 | safe_str_free(&w->op); |
| 2115 | free(w); |
| 2116 | } |
| 2117 | |
| 2118 | static void free_case_expr(cbm_case_expr_t *k) { |
| 2119 | if (!k) { |
no test coverage detected