Memory leak in clientCommand #256

Closed
jokea opened this Issue Dec 19, 2011 · 1 comment

Projects

None yet

2 participants

@jokea
jokea commented Dec 19, 2011

There's a memory leak in clientCommand(redis-2.4.4):

:> info
...
used_memory:726096
used_memory_human:709.08K
...

:> 10000 client list

:> info
...
used_memory:3286376
used_memory_human:3.13M
...

It is caused by getAllClientsInfoString() in networking.c:
960 o = sdscatsds(o,getClientInfoString(client));
the string returned by getClientInfoString() should be freed.

@antirez antirez added a commit that referenced this issue Dec 19, 2011
@antirez 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
0a466a7
@antirez
Owner
antirez commented Dec 19, 2011

Fixed, thank you!

@antirez antirez closed this Dec 19, 2011
@antirez antirez added a commit that referenced this issue Dec 19, 2011
@antirez 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
8b860b3
@JackieXie168 JackieXie168 pushed a commit to JackieXie168/redis that referenced this issue Aug 29, 2016
@antirez 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
4576263
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment