| 163 | } |
| 164 | |
| 165 | void CommandCtx_Free |
| 166 | ( |
| 167 | CommandCtx *command_ctx |
| 168 | ) { |
| 169 | // decrement reference count |
| 170 | if(atomic_fetch_sub(&command_ctx->ref_count, 1) == 1) { |
| 171 | // reference count is zero, free command context |
| 172 | ASSERT(command_ctx->bc == NULL); |
| 173 | |
| 174 | if(command_ctx->query != NULL) rm_free(command_ctx->query); |
| 175 | rm_free(command_ctx->command_name); |
| 176 | rm_free(command_ctx); |
| 177 | } |
| 178 | } |
no test coverage detected