Even if the arrest is illegal, resisting can still lead to charges for resisting or obstructing an officer.