]> git.saurik.com Git - redis.git/commitdiff
ae.c: solved a memory leak with no practical effects (since the event
authorantirez <antirez@gmail.com>
Fri, 16 Dec 2011 08:55:01 +0000 (09:55 +0100)
committerantirez <antirez@gmail.com>
Fri, 16 Dec 2011 08:55:06 +0000 (09:55 +0100)
loop is never destroyed in Redis). Thanks to @anydot for noticing it.

src/ae.c

index 98ff7a8eee60242f64a0080555d74cdfb2a10295..6ddccdf7ee3f231ac276e3f31873676645c67c84 100644 (file)
--- a/src/ae.c
+++ b/src/ae.c
@@ -86,6 +86,8 @@ aeEventLoop *aeCreateEventLoop(int setsize) {
 
 void aeDeleteEventLoop(aeEventLoop *eventLoop) {
     aeApiFree(eventLoop);
+    zfree(eventLoop->events);
+    zfree(eventLoop->fired);
     zfree(eventLoop);
 }