Fixed uninitialized variable FP after realloc if it fails. Related with ticket: #5240