Changes by: szaka
Update of /cvs/linux-ntfs/ntfsprogs/ntfsprogs
In directory delta357.server4you.de:/tmp/cvs-serv8434
Modified Files:
ntfsinfo.c
Log Message:
convert all malloc() to ntfs_malloc()
Index: ntfsinfo.c
===================================================================
RCS file: /cvs/linux-ntfs/ntfsprogs/ntfsprogs/ntfsinfo.c,v
retrieving revision 1.142
retrieving revision 1.143
diff -u -p -r1.142 -r1.143
--- ntfsinfo.c 13 Aug 2006 18:58:21 -0000 1.142
+++ ntfsinfo.c 13 Aug 2006 18:59:56 -0000 1.143
@@ -78,6 +78,7 @@
#include "dir.h"
#include "ntfstime.h"
#include "version.h"
+#include "support.h"
static const char *EXEC_NAME = "ntfsinfo";
@@ -630,11 +631,10 @@ static void ntfs_dump_attr_list(ATTR_REC
ntfs_log_perror("ntfs_get_attribute_value_length failed");
return;
}
- value = malloc(l);
- if (!value) {
- ntfs_log_perror("malloc failed");
+ value = ntfs_malloc(l);
+ if (!value)
return;
- }
+
l = ntfs_get_attribute_value(vol, attr, value);
if (!l) {
ntfs_log_perror("ntfs_get_attribute_value failed");
@@ -949,9 +949,8 @@ static void ntfs_dump_attr_security_desc
s64 data_size, bytes_read;
data_size = sle64_to_cpu(attr->data_size);
- sec_desc_attr = malloc(data_size);
+ sec_desc_attr = ntfs_malloc(data_size);
if (!sec_desc_attr) {
- ntfs_log_perror("malloc failed");
free(rl);
return;
}
@@ -1737,9 +1736,8 @@ static void ntfs_dump_attr_ea(ATTR_RECOR
if (rl) {
s64 bytes_read;
- buf = malloc(data_size);
+ buf = ntfs_malloc(data_size);
if (!buf) {
- ntfs_log_perror("malloc failed");
free(rl);
return;
}
|