from a margin stand point,:
the Profitable Option rule will allow you to liquidate a stock position on the business day following expiration without incurring any violations but you have to remember that brokers are allowed to impose additional restrictions on top of those set by the regulatory bodies.
Also, if your account is "cash up front" restricted from prior margin violations you would be limited to the cash + excess equity in the account.
I'd say check with your broker.
from a risk stand point:
if both legs are deep ITM you shouldn't have any issues (the spread has already been paid for) but if there's a chance that the short leg may expire worthless, your broker's risk department will look at the size of you account compared to the expected stock purchase and could force you to close the whole position if its too large for the account.