Commit eff212ea authored by clark.kang's avatar clark.kang
Browse files

fix sentinel memory leak

parent 1b25757f
...@@ -922,6 +922,7 @@ sentinelRedisInstance *createSentinelRedisInstance(char *name, int flags, char * ...@@ -922,6 +922,7 @@ sentinelRedisInstance *createSentinelRedisInstance(char *name, int flags, char *
else if (flags & SRI_SENTINEL) table = master->sentinels; else if (flags & SRI_SENTINEL) table = master->sentinels;
sdsname = sdsnew(name); sdsname = sdsnew(name);
if (dictFind(table,sdsname)) { if (dictFind(table,sdsname)) {
releaseSentinelAddr(addr);
sdsfree(sdsname); sdsfree(sdsname);
errno = EBUSY; errno = EBUSY;
return NULL; return NULL;
......
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