diff options
author | Matt Fleming <matt.fleming@intel.com> | 2013-02-18 20:25:27 +0000 |
---|---|---|
committer | Matt Fleming <matt.fleming@intel.com> | 2013-02-26 11:29:09 +0000 |
commit | c87df9b16191023498c2780e47527cfee3ddf015 (patch) | |
tree | 21f8a59e82184fd866c9d7963f99da2a61e72f10 | |
parent | 76da2ae050d72a31fd47c2fb53f7081781de62ff (diff) | |
download | syslinux-c87df9b16191023498c2780e47527cfee3ddf015.tar.gz syslinux-c87df9b16191023498c2780e47527cfee3ddf015.tar.xz syslinux-c87df9b16191023498c2780e47527cfee3ddf015.zip |
pxe: Handle closing file with NULL ->inode
It's possible that pxe_close_file() will be called with a NULL
file->inode from searchdir() if pxe_searchdir() fails to lookup a
file.
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
-rw-r--r-- | core/fs/pxe/pxe.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/core/fs/pxe/pxe.c b/core/fs/pxe/pxe.c index 52787514..ff8a0b33 100644 --- a/core/fs/pxe/pxe.c +++ b/core/fs/pxe/pxe.c @@ -74,6 +74,9 @@ static void pxe_close_file(struct file *file) struct inode *inode = file->inode; struct pxe_pvt_inode *socket = PVT(inode); + if (!inode) + return; + if (!socket->tftp_goteof) { socket->ops->close(inode); } |