MCPcopy Create free account
hub / github.com/F-Stack/f-stack / moduleFreeContext

Function moduleFreeContext

app/redis-6.2.6/src/module.c:668–683  ·  view source on GitHub ↗

Free the context after the user function was called. */

Source from the content-addressed store, hash-verified

666
667/* Free the context after the user function was called. */
668void moduleFreeContext(RedisModuleCtx *ctx) {
669 moduleHandlePropagationAfterCommandCallback(ctx);
670 autoMemoryCollect(ctx);
671 poolAllocRelease(ctx);
672 if (ctx->postponed_arrays) {
673 zfree(ctx->postponed_arrays);
674 ctx->postponed_arrays_count = 0;
675 serverLog(LL_WARNING,
676 "API misuse detected in module %s: "
677 "RedisModule_ReplyWithArray(REDISMODULE_POSTPONED_ARRAY_LEN) "
678 "not matched by the same number of RedisModule_SetReplyArrayLen() "
679 "calls.",
680 ctx->module->name);
681 }
682 if (ctx->flags & REDISMODULE_CTX_THREAD_SAFE) freeClient(ctx->client);
683}
684
685/* This Redis command binds the normal Redis command invocation with commands
686 * exported by modules. */

Callers 15

rdbSaveObjectFunction · 0.85
rdbSaveSingleModuleAuxFunction · 0.85
rdbLoadObjectFunction · 0.85
rdbLoadRioFunction · 0.85
rewriteModuleObjectFunction · 0.85
RM_SaveDataTypeToStringFunction · 0.85
unblockClientFromModuleFunction · 0.85

Calls 5

autoMemoryCollectFunction · 0.85
poolAllocReleaseFunction · 0.85
zfreeFunction · 0.70
freeClientFunction · 0.70

Tested by

no test coverage detected