Use malloc+memcpy rather than calloc+strcpy in rs_strdup.