goto out; 
goto out_free; 
static int connect_to_switch(struct daemon_data *pri){	struct sockaddr_un *ctl_addr = pri->ctl_addr;	struct sockaddr_un *local_addr = pri->local_addr;	struct sockaddr_un *sun;	struct request_v3 req;	int fd, n, err;	pri->control = socket(AF_UNIX, SOCK_STREAM, 0);	if(pri->control < 0){		printk("daemon_open : control socket failed, errno = %d\n", 		       errno);				return(-errno);	}	if(connect(pri->control, (struct sockaddr *) ctl_addr, 		   sizeof(*ctl_addr)) < 0){		printk("daemon_open : control connect failed, errno = %d\n",		       errno);		err = -errno;		goto out;	}	fd = socket(AF_UNIX, SOCK_DGRAM, 0);	if(fd < 0){		printk("daemon_open : data socket failed, errno = %d\n", 		       errno);		err = -errno;		goto out;	}	if(bind(fd, (struct sockaddr *) local_addr, sizeof(*local_addr)) < 0){		printk("daemon_open : data bind failed, errno = %d\n", 		       errno);		err = -errno;		goto out_close;	}	sun = um_kmalloc(sizeof(struct sockaddr_un));	if(sun == NULL){		printk("new_addr: allocation of sockaddr_un failed\n");		err = -ENOMEM;		goto out_close;	}	req.magic = SWITCH_MAGIC;	req.version = SWITCH_VERSION;	req.type = REQ_NEW_CONTROL;	req.sock = *local_addr;	n = os_write_file(pri->control, &req, sizeof(req));	if(n != sizeof(req)){		printk("daemon_open : control setup request failed, err = %d\n",		       -n);		err = -ENOTCONN;		goto out;			}	n = os_read_file(pri->control, sun, sizeof(*sun));	if(n != sizeof(*sun)){		printk("daemon_open : read of data socket failed, err = %d\n",		       -n);		err = -ENOTCONN;		goto out_close;			}	pri->data_addr = sun;	return(fd); out_close:	os_close_file(fd); out:	os_close_file(pri->control);	return(err);}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/ba260e23efbabcff975f60401475c2bdd693f872/daemon_user.c/buggy/arch/um/drivers/daemon_user.c