Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
7229fa8d
Commit
7229fa8d
authored
Nov 24, 2017
by
antirez
Browse files
Modules: fix memory leak in RM_IsModuleNameBusy().
parent
4d063bb6
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/module.c
View file @
7229fa8d
...
...
@@ -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
)
{
sdsfree
(
modulename
);
return
1
;
}
return
0
;
dictEntry
*
de
=
dictFind
(
modules
,
modulename
);
sdsfree
(
modulename
);
return
de
!=
NULL
;
}
/* Return the current UNIX time in milliseconds. */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment