Actually we don't clean the tx until the inspect_id has been updated.  And since I lock the de_state, inspect_id can't be updated, but the app layer can indeed realloc the tx pointer.

So shall I put it inside the loop?