提交 8d38ef20 编写于 作者: Y Yossi Gottlieb 提交者: antirez

CommandFilter API: fix UnregisterCommandFilter.

上级 9b7009b1
......@@ -4889,9 +4889,8 @@ int RM_UnregisterCommandFilter(RedisModuleCtx *ctx, RedisModuleCommandFilter *fi
listDelNode(moduleCommandFilters,ln);
ln = listSearchKey(ctx->module->filters,filter);
if (ln) {
listDelNode(moduleCommandFilters,ln);
}
if (!ln) return REDISMODULE_ERR; /* Shouldn't happen */
listDelNode(ctx->module->filters,ln);
return REDISMODULE_OK;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册