Fixed memleak in CLIENT INFO, added simple test that will work as regression test on mac os x and in the CI when running over valgrind. This fixes issue #256
This commit is contained in:
parent
a244a13b4c
commit
0a466a7542
@ -997,8 +997,12 @@ sds getAllClientsInfoString(void) {
|
|||||||
|
|
||||||
listRewind(server.clients,&li);
|
listRewind(server.clients,&li);
|
||||||
while ((ln = listNext(&li)) != NULL) {
|
while ((ln = listNext(&li)) != NULL) {
|
||||||
|
sds cs;
|
||||||
|
|
||||||
client = listNodeValue(ln);
|
client = listNodeValue(ln);
|
||||||
o = sdscatsds(o,getClientInfoString(client));
|
cs = getClientInfoString(client);
|
||||||
|
o = sdscatsds(o,cs);
|
||||||
|
sdsfree(cs);
|
||||||
o = sdscatlen(o,"\n",1);
|
o = sdscatlen(o,"\n",1);
|
||||||
}
|
}
|
||||||
return o;
|
return o;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user