rem: free_uri(&puri);
add: if (hf_type != 4) free_uri(&puri);
context: int is_user_in(struct sip_msg* _msg, char* _hf, char* _grp){	db_key_t keys[3] = {grp_user_col, grp_grp_col, grp_domain_col};	db_val_t vals[3];	db_key_t col[1] = {grp_grp_col};	db_res_t* res;	str uri, user;	int hf_type;	struct sip_uri puri;		hf_type = (int)_hf;	switch(hf_type) {	case 1: /* Request-URI */		if (get_request_uri(_msg, &uri) < 0) {			LOG(L_ERR, "is_user_in(): Error while obtaining username from Request-URI\n");			return -1;		}		break;	case 2: /* To */		if (get_to_uri(_msg, &uri) < 0) {			LOG(L_ERR, "is_user_in(): Error while extracting To username\n");			return -2;		}		break;	case 3: /* From */		if (get_from_uri(_msg, &uri) < 0) {			LOG(L_ERR, "is_user_in(): Error while extracting From username\n");			return -3;		}		break;	case 4: /* Credentials */		if (get_cred_user(_msg, &user) < 0) {			LOG(L_ERR, "is_user_in(): Error while extracting digest username\n");			return -4;		}		break;	}	if (hf_type != 4) {		if (parse_uri(uri.s, uri.len, &puri) < 0) {			LOG(L_ERR, "is_user_in(): Error while parsing URI\n");			return -5;		}		if (grp_use_domain) {			VAL_TYPE(vals + 2) = DB_STR;			VAL_NULL(vals + 2) = 0;			VAL_STR(vals + 2) = puri.host;		}		VAL_STR(vals) = puri.user;	} else {		VAL_STR(vals) = user;	}		VAL_TYPE(vals) = VAL_TYPE(vals + 1) = DB_STR;	VAL_NULL(vals) = VAL_NULL(vals + 1) = 0;	VAL_STR(vals + 1) = *((str*)_grp);		db_use_table(db_handle, grp_table);	if (db_query(db_handle, keys, 0, vals, col, (grp_use_domain && (hf_type != 4)) ? (3): (2), 1, 0, &res) < 0) {		LOG(L_ERR, "is_user_in(): Error while querying database\n");		free_uri(&puri);		return -5;	}		if (RES_ROW_N(res) == 0) {		DBG("is_user_in(): User is not in group \'%.*s\'\n", 		    ((str*)_grp)->len, ((str*)_grp)->s);		db_free_query(db_handle, res);		free_uri(&puri);		return -6;	} else {		DBG("is_user_in(): User is in group \'%.*s\'\n", 		    ((str*)_grp)->len, ((str*)_grp)->s);		db_free_query(db_handle, res);		free_uri(&puri);		return 1;	}}