using calloc on redo_buf for valgrind