Don't memset until we know malloc succeeded! (DOH!)