When an index could not be used, the search context was not freed
VCN parent_vcn[MAX_PARENT_VCN]; /* entry's parent nodes */
int pindex; /* maximum it's the number of the parent nodes */
BOOL ib_dirty;
+ BOOL bad_index;
u32 block_size;
u8 vcn_size_bits;
} ntfs_index_context;
{
ntfs_log_trace("Entering\n");
- if (!icx->entry)
+ if (!icx->bad_index && !icx->entry)
return;
if (icx->actx)
ret = ntfs_ie_lookup(key, key_len, icx, &ir->index, &vcn, &ie);
if (ret == STATUS_ERROR) {
err = errno;
- goto err_out;
+ goto err_lookup;
}
icx->ir = ir;
goto descend_into_child_node;
err_out:
+ icx->bad_index = TRUE; /* Force icx->* to be freed */
+err_lookup:
free(ib);
if (!err)
err = EIO;