pxe: Don't leak inode on timeout
authorMatt Fleming <matt.fleming@intel.com>
Tue, 27 Nov 2012 16:11:26 +0000 (16:11 +0000)
committerMatt Fleming <matt.fleming@intel.com>
Tue, 27 Nov 2012 20:48:38 +0000 (20:48 +0000)
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
core/fs/pxe/pxe.c

index 6f490ce..3cc6497 100644 (file)
@@ -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;