Fix wrong error logic that would lead to segfault when malloc fails.

edge.strict_endians
uvman 2006-10-30 19:40:56 +00:00
parent 3e3196133c
commit f6d6db57db
1 changed files with 4 additions and 4 deletions

View File

@ -385,11 +385,11 @@ static INDEX_ENTRY *ntfs_ie_dup_novcn(INDEX_ENTRY *ie)
size -= sizeof(VCN);
dup = ntfs_malloc(size);
if (dup)
if (dup) {
memcpy(dup, ie, size);
dup->flags &= ~INDEX_ENTRY_NODE;
dup->length = size;
dup->flags &= ~INDEX_ENTRY_NODE;
dup->length = size;
}
return dup;
}