upgrade_to_large_index(): fix double freeing ctx in certain error situation

edge.strict_endians
szaka 2006-08-13 14:17:02 +00:00
parent 64a319948b
commit c41b7a65a1
1 changed files with 1 additions and 1 deletions

View File

@ -2424,7 +2424,6 @@ static int upgrade_to_large_index(MFT_RECORD *m, const char *name,
err = -EINVAL;
goto err_out;
}
ntfs_attr_put_search_ctx(ctx);
r = (INDEX_ROOT*)((char*)a + le16_to_cpu(a->value_offset));
re_end = (char*)r + le32_to_cpu(a->value_length);
re_start = (char*)&r->index + le32_to_cpu(r->index.entries_offset);
@ -2520,6 +2519,7 @@ static int upgrade_to_large_index(MFT_RECORD *m, const char *name,
goto err_out;
}
*idx = ia_val;
ntfs_attr_put_search_ctx(ctx);
return 0;
err_out:
ntfs_attr_put_search_ctx(ctx);