mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-23 00:28:26 -05:00
fix sentinel memory leak
This commit is contained in:
parent
1b25757f41
commit
eff212ea95
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user