moduleRDBLoadError(): io->ctx may be NULL.
The correct way to access the module about a given IO context is to deference io->type->module, since io->ctx is only populated if the user requests an explicit context from an IO object.
This commit is contained in:
parent
8b5848a4f5
commit
916c4e5d86
@ -3177,7 +3177,7 @@ void *RM_ModuleTypeGetValue(RedisModuleKey *key) {
|
|||||||
* modules this cannot be recovered, but if the module declared capability
|
* modules this cannot be recovered, but if the module declared capability
|
||||||
* to handle errors, we'll raise a flag rather than exiting. */
|
* to handle errors, we'll raise a flag rather than exiting. */
|
||||||
void moduleRDBLoadError(RedisModuleIO *io) {
|
void moduleRDBLoadError(RedisModuleIO *io) {
|
||||||
if (io->ctx->module->options & REDISMODULE_OPTIONS_HANDLE_IO_ERRORS) {
|
if (io->type->module->options & REDISMODULE_OPTIONS_HANDLE_IO_ERRORS) {
|
||||||
io->error = 1;
|
io->error = 1;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user