Merge pull request #4628 from mnunberg/patch-1

redismodule.h: Check ModuleNameBusy before calling it
This commit is contained in:
Salvatore Sanfilippo 2018-01-24 10:48:04 +01:00 committed by GitHub
commit 4bffeda8b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -374,7 +374,7 @@ static int RedisModule_Init(RedisModuleCtx *ctx, const char *name, int ver, int
REDISMODULE_GET_API(AbortBlock);
#endif
if (RedisModule_IsModuleNameBusy(name)) return REDISMODULE_ERR;
if (RedisModule_IsModuleNameBusy && RedisModule_IsModuleNameBusy(name)) return REDISMODULE_ERR;
RedisModule_SetModuleAttribs(ctx,name,ver,apiver);
return REDISMODULE_OK;
}