From 1e6208cb786b3745aa0897eaadac816faa9b3cb1 Mon Sep 17 00:00:00 2001 From: short <> Date: Sun, 31 Aug 2003 12:57:06 +0000 Subject: [PATCH 1/1] ntfs_attr_close(): Ignore NULL 'ntfs_attr'. - Fixes ntfs_readdir() of non-root directory SIGSEGV. --- libntfs/attrib.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libntfs/attrib.c b/libntfs/attrib.c index b04bb38..d8cc670 100644 --- a/libntfs/attrib.c +++ b/libntfs/attrib.c @@ -382,6 +382,8 @@ err_out: */ void ntfs_attr_close(ntfs_attr *na) { + if (!na) + return; if (NAttrNonResident(na) && na->rl) free(na->rl); /* Don't release if using an internal constant. */ -- 1.8.3.1