Commit ec8fd6e5 authored by Dvir Volk's avatar Dvir Volk
Browse files

fixed sizeof in allocating io RedisModuleCtx*

parent 9749e96f
......@@ -3000,7 +3000,7 @@ void RM_EmitAOF(RedisModuleIO *io, const char *cmdname, const char *fmt, ...) {
RedisModuleCtx *RM_GetContextFromIO(RedisModuleIO *io) {
if (io->ctx) return io->ctx; /* Can't have more than one... */
RedisModuleCtx ctxtemplate = REDISMODULE_CTX_INIT;
io->ctx = zmalloc(sizeof(*io));
io->ctx = zmalloc(sizeof(RedisModuleCtx));
*(io->ctx) = ctxtemplate;
io->ctx->module = io->type->module;
io->ctx->client = NULL;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment