s4-registry: Don't leak memory on error.