Fix memory leak.
Relax sanity check: in some cases out_tx can be NULL when in RES_LINE state.