ntfs_attr_close(): Ignore NULL 'ntfs_attr'.
authorshort <>
Sun, 31 Aug 2003 12:57:06 +0000 (12:57 +0000)
committershort <>
Sun, 31 Aug 2003 12:57:06 +0000 (12:57 +0000)
 - Fixes ntfs_readdir() of non-root directory SIGSEGV.

libntfs/attrib.c

index b04bb38..d8cc670 100644 (file)
@@ -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. */