mirror of https://mirror.osredm.com/root/redis.git
Merge pull request #2551 from charsyam/feature/sentinel-memory-leak-1
fix sentinel memory leak
This commit is contained in:
commit
827d07f005
|
@ -922,6 +922,7 @@ sentinelRedisInstance *createSentinelRedisInstance(char *name, int flags, char *
|
|||
else if (flags & SRI_SENTINEL) table = master->sentinels;
|
||||
sdsname = sdsnew(name);
|
||||
if (dictFind(table,sdsname)) {
|
||||
releaseSentinelAddr(addr);
|
||||
sdsfree(sdsname);
|
||||
errno = EBUSY;
|
||||
return NULL;
|
||||
|
|
Loading…
Reference in New Issue