Changes by: yura
Update of /cvs/linux-ntfs/ntfsprogs/libntfs
In directory delta357:/tmp/cvs-serv28216/libntfs
Modified Files:
dir.c volume.c
Log Message:
Fix several memleaks
Index: dir.c
===================================================================
RCS file: /cvs/linux-ntfs/ntfsprogs/libntfs/dir.c,v
retrieving revision 1.70
retrieving revision 1.71
diff -u -p -r1.70 -r1.71
--- dir.c 27 Oct 2006 12:24:30 -0000 1.70
+++ dir.c 27 Oct 2006 14:15:32 -0000 1.71
@@ -1261,6 +1261,7 @@ static ntfs_inode *__ntfs_create(ntfs_in
ntfs_log_error("Failed to add INDEX_ROOT attribute.\n");
goto err_out;
}
+ free(ir);
} else {
INTX_FILE *data;
int data_len;
@@ -1312,6 +1313,7 @@ static ntfs_inode *__ntfs_create(ntfs_in
if (ntfs_attr_add(ni, AT_DATA, AT_UNNAMED, 0, (u8*)data,
data_len)) {
err = errno;
+ free(data);
ntfs_log_error("Failed to add DATA attribute.\n");
goto err_out;
}
Index: volume.c
===================================================================
RCS file: /cvs/linux-ntfs/ntfsprogs/libntfs/volume.c,v
retrieving revision 1.72
retrieving revision 1.73
diff -u -p -r1.72 -r1.73
--- volume.c 27 Oct 2006 12:24:30 -0000 1.72
+++ volume.c 27 Oct 2006 14:15:32 -0000 1.73
@@ -220,6 +220,7 @@ mft_has_no_attr_list:
std_info = ntfs_attr_readall(vol->mft_ni, AT_STANDARD_INFORMATION,
AT_UNNAMED, 0, NULL);
vol->mft_ni->flags = std_info->file_attributes;
+ free(std_info);
/* We now have a fully setup ntfs inode for $MFT in vol->mft_ni. */
|