Commit 7229fa8d authored by antirez's avatar antirez
Browse files

Modules: fix memory leak in RM_IsModuleNameBusy().

parent 4d063bb6
......@@ -664,13 +664,9 @@ void RM_SetModuleAttribs(RedisModuleCtx *ctx, const char *name, int ver, int api
* Otherwise zero is returned. */
int RM_IsModuleNameBusy(const char *name) {
sds modulename = sdsnew(name);
/* Check if the module name is busy. */
if (dictFind(modules,modulename) != NULL) {
dictEntry *de = dictFind(modules,modulename);
sdsfree(modulename);
return 1;
}
return 0;
return de != NULL;
}
/* Return the current UNIX time in milliseconds. */
......
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