git » nmdb » commit e8ed685

Add missing free() on spurious TCP wakeup.

author Alberto Bertogli
2007-06-04 05:18:20 UTC
committer Alberto Bertogli
2007-06-04 05:18:20 UTC
parent b5f0207fb8c377e306710e373977125112587d59

Add missing free() on spurious TCP wakeup.

Signed-off-by: Alberto Bertogli <albertito@gmail.com>

nmdb/tcp.c +1 -0

diff --git a/nmdb/tcp.c b/nmdb/tcp.c
index 7b34508..2af231c 100644
--- a/nmdb/tcp.c
+++ b/nmdb/tcp.c
@@ -352,6 +352,7 @@ static void tcp_recv(int fd, short event, void *arg)
 		if (rv < 0 && errno == EAGAIN) {
 			/* We were awoken but have no data to read, so we do
 			 * nothing */
+			free(buf);
 			return;
 		} else if (rv <= 0) {
 			/* Orderly shutdown or error; close the file