fixed Coverity issue 1147772. Write to a pointer after free.
Fixed Coverity issue 1187617. Write to pointer after free in req_runjob.
This also exposed a memory leak with preq.