Changes by: uvman
Update of /cvs/linux-ntfs/ntfsprogs/libntfs
In directory delta357:/tmp/cvs-serv18999/libntfs
Modified Files:
dir.c
Log Message:
Avoid a memory leak on the error code path.
Index: dir.c
===================================================================
RCS file: /cvs/linux-ntfs/ntfsprogs/libntfs/dir.c,v
retrieving revision 1.71
retrieving revision 1.72
diff -u -p -r1.71 -r1.72
--- dir.c 27 Oct 2006 14:15:32 -0000 1.71
+++ dir.c 30 Oct 2006 13:43:09 -0000 1.72
@@ -1376,10 +1376,12 @@ err_out:
ntfs_log_perror("Failed to open SD (0x50) attribute of "
" inode 0x%llx. Run chkdsk.\n",
(unsigned long long)ni->mft_no);
- else if (ntfs_attr_rm(na))
+ else if (ntfs_attr_rm(na)) {
ntfs_log_perror("Failed to remove SD (0x50) attribute "
"of inode 0x%llx. Run chkdsk.\n",
(unsigned long long)ni->mft_no);
+ ntfs_attr_close(na);
+ }
}
if (rollback_data) {
ntfs_attr *na;
|