Skip to content
Browse files

Fixed memleak in CLIENT INFO, added simple test that will work as reg…

…ression test on mac os x and in the CI when running over valgrind. This fixes issue #256
  • Loading branch information...
1 parent 61e44f6 commit 8b860b36b34cab1c461911d949d75541d8f8ee84 @antirez committed Dec 19, 2011
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/networking.c
View
6 src/networking.c
@@ -956,8 +956,12 @@ sds getAllClientsInfoString(void) {
listRewind(server.clients,&li);
while ((ln = listNext(&li)) != NULL) {
+ sds cs;
+
client = listNodeValue(ln);
- o = sdscatsds(o,getClientInfoString(client));
+ cs = getClientInfoString(client);
+ o = sdscatsds(o,cs);
+ sdsfree(cs);
o = sdscatlen(o,"\n",1);
}
return o;

0 comments on commit 8b860b3

Please sign in to comment.
Something went wrong with that request. Please try again.