summaryrefslogtreecommitdiff
path: root/src/aof.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/aof.c')
-rw-r--r--src/aof.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/aof.c b/src/aof.c
index e52b7e214..c75153cc7 100644
--- a/src/aof.c
+++ b/src/aof.c
@@ -1023,6 +1023,10 @@ int rewriteModuleObject(rio *r, robj *key, robj *o) {
moduleType *mt = mv->type;
moduleInitIOContext(io,mt,r);
mt->aof_rewrite(&io,key,mv->value);
+ if (io.ctx) {
+ moduleFreeContext(io.ctx);
+ zfree(io.ctx);
+ }
return io.error ? 0 : 1;
}