If the reallocation of dir_info fails, we will eventually cause e2fsck
to fail with an internal error. So if the realloc fails, print a
message and bail out with a fatal error early when at the time of the
reallocation failure.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
sizeof(struct dir_info),
&ctx->dir_info->array);
if (retval) {
+ fprintf(stderr, "Couldn't reallocate dir_info "
+ "structure to %d entries\n",
+ ctx->dir_info->size);
+ fatal_error(ctx, 0);
ctx->dir_info->size -= 10;
return;
}
sizeof(struct dx_dir_info),
&ctx->dx_dir_info);
if (retval) {
+ fprintf(stderr, "Couldn't reallocate dx_dir_info "
+ "structure to %d entries\n",
+ ctx->dx_dir_info_size);
+ fatal_error(ctx, 0);
ctx->dx_dir_info_size -= 10;
return;
}