From 73bf7c135dfce1d0194de6677ed85495c64e300f Mon Sep 17 00:00:00 2001 From: Matt Fleming Date: Tue, 27 Nov 2012 16:11:26 +0000 Subject: [PATCH] pxe: Don't leak inode on timeout Signed-off-by: Matt Fleming --- core/fs/pxe/pxe.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/fs/pxe/pxe.c b/core/fs/pxe/pxe.c index 6f490ce8..3cc64973 100644 --- a/core/fs/pxe/pxe.c +++ b/core/fs/pxe/pxe.c @@ -796,8 +796,10 @@ static void __pxe_searchdir(const char *filename, struct file *file) sendreq: timeout = *timeout_ptr++; - if (!timeout) + if (!timeout) { + free_socket(inode); return; /* No file available... */ + } oldtime = jiffies(); socket->tftp_remoteip = ip; -- 2.11.4.GIT