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