MCPcopy Create free account
hub / github.com/RedisGraph/RedisGraph / CommandCtx_Free

Function CommandCtx_Free

src/commands/cmd_context.c:165–178  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

163}
164
165void 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}

Callers 8

logCommandsFunction · 0.85
InfoFuncFunction · 0.85
_ExecuteQueryFunction · 0.85
_queryFunction · 0.85
Graph_ExplainFunction · 0.85
CommandDispatchFunction · 0.85
_info_running_queriesFunction · 0.85
_info_waiting_queriesFunction · 0.85

Calls 1

rm_freeFunction · 0.85

Tested by

no test coverage detected