Fix double free of JobView in KUIServerV2JobTracker
If the job finished before the UI server responds, then the job is already set to the terminated state.
The control flow of the response lambda in this case is as follows:
- Create jobView
- Assign it to trackedJob's unique_ptr
- Delete jobView
- Remove and delete trackedJob
- trackedJob's destructor attempts to delete jobView
which results in an attempt to delete jobView twice.
Now we create the jobView as a unique_ptr and let it get cleaned up automatically at the end of the function.
Edited by Jack Hill