res_pjsip_history: Fix multiple leaks on vector append failure.