The function `well_state_add_MSW2` in `well_state.cpp` would allocate
an `ecl_rsthead_type` object but would not free it in the case where
the `RSEG_KW` keyword was not found in the restart file view.
This would lead to a memory leak.
This commit fixes the issue by freeing the allocated object before
returning from the function in the error case.