rem: memset(res, 0, sizeof(rr_t));
add: memcpy(res, _r, sizeof(rr_t));
context: static inline int do_duplicate_rr(struct sip_msg* _m, rr_t** _new, rr_t* _r, int _shm){	int len, ret;	rr_t* res;	if (!_m || !_new || !_r) {		LOG(L_ERR, "duplicate_rr(): Invalid parameter value\n");		return -1;	}	if (_r->params) {		len = _r->params->name.s + _r->params->len - _r->nameaddr.name.s;	} else {		len = _r->nameaddr.len;	}	if (_shm) res = shm_malloc(sizeof(rr_t) + len);	else res = pkg_malloc(sizeof(rr_t) + len);	if (!res) {		LOG(L_ERR, "duplicate_rr(): No memory left\n");		return -2;	}	memset(res, 0, sizeof(rr_t));        res->nameaddr.name.s = (char*)res + sizeof(rr_t);	memcpy(res->nameaddr.name.s, _r->nameaddr.name.s, len);	if (_shm) {		ret = shm_duplicate_params(&res->params, _r->params);	} else {		ret = duplicate_params(&res->params, _r->params);	}	if (ret < 0) {		LOG(L_ERR, "Error while duplicating parameters\n");		if (_shm) shm_free(res);		else pkg_free(res);		return -3;	}	xlate_pointers(_m, res);	*_new = res;	return 0;}