if (chan->local_addr) kfree(chan->local_addr);  
kfree(chan->local_addr); 
static int cycx_wan_new_if(struct wan_device *wandev, struct net_device *dev,			   wanif_conf_t *conf){	struct cycx_device *card = wandev->private;	struct cycx_x25_channel *chan;	int err = 0;	if (!conf->name[0] || strlen(conf->name) > WAN_IFNAME_SZ) {		printk(KERN_INFO "%s: invalid interface name!\n",		       card->devname);		return -EINVAL;	}	/* allocate and initialize private data */	chan = kmalloc(sizeof(struct cycx_x25_channel), GFP_KERNEL);	if (!chan)		return -ENOMEM;	memset(chan, 0, sizeof(*chan));	strcpy(chan->name, conf->name);	chan->card = card;	chan->link = conf->port;	chan->protocol = conf->protocol ? ETH_P_X25 : ETH_P_IP;	chan->rx_skb = NULL;	/* only used in svc connected thru crossover cable */	chan->local_addr = NULL;	if (conf->addr[0] == '@') {	/* SVC */		int len = strlen(conf->local_addr);		if (len) {			if (len > WAN_ADDRESS_SZ) {				printk(KERN_ERR "%s: %s local addr too long!\n",						wandev->name, chan->name);				kfree(chan);				return -EINVAL;			} else {				chan->local_addr = kmalloc(len + 1, GFP_KERNEL);				if (!chan->local_addr) {					kfree(chan);					return -ENOMEM;				}			}			strncpy(chan->local_addr, conf->local_addr,				WAN_ADDRESS_SZ);		}		chan->svc = 1;		strncpy(chan->addr, &conf->addr[1], WAN_ADDRESS_SZ);		init_timer(&chan->timer);		chan->timer.function	= cycx_x25_chan_timer;		chan->timer.data	= (unsigned long)dev;		/* Set channel timeouts (default if not specified) */		chan->idle_tmout = conf->idle_timeout ? conf->idle_timeout : 90;	} else if (is_digit(conf->addr[0])) {	/* PVC */		s16 lcn = dec_to_uint(conf->addr, 0);		if (lcn >= card->u.x.lo_pvc && lcn <= card->u.x.hi_pvc)			chan->lcn = lcn;		else {			printk(KERN_ERR				"%s: PVC %u is out of range on interface %s!\n",				wandev->name, lcn, chan->name);			err = -EINVAL;		}	} else {		printk(KERN_ERR "%s: invalid media address on interface %s!\n",				wandev->name, chan->name);		err = -EINVAL;	}	if (err) {		if (chan->local_addr)			kfree(chan->local_addr);		kfree(chan);		return err;	}	/* prepare network device data space for registration */	strcpy(dev->name, chan->name);	dev->init = cycx_netdevice_init;	dev->priv = chan;	return 0;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/6a5d362120a61a719095443194cc2d5e9a7027dd/cycx_x25.c/clean/drivers/net/wan/cycx_x25.c