kfree(cache); 
CSR1212_FREE(cache); 
static int modify_config_rom(struct file_info *fi, struct pending_request *req){	struct csr1212_keyval *kv;	struct csr1212_csr_rom_cache *cache;	struct csr1212_dentry *dentry;	u32 dr;	int ret = 0;	if (req->req.misc == ~0) {		if (req->req.length == 0)			return -EINVAL;		/* Find an unused slot */		for (dr = 0;		     dr < RAW1394_MAX_USER_CSR_DIRS && fi->csr1212_dirs[dr];		     dr++) ;		if (dr == RAW1394_MAX_USER_CSR_DIRS)			return -ENOMEM;		fi->csr1212_dirs[dr] =		    csr1212_new_directory(CSR1212_KV_ID_VENDOR);		if (!fi->csr1212_dirs[dr])			return -ENOMEM;	} else {		dr = req->req.misc;		if (!fi->csr1212_dirs[dr])			return -EINVAL;		/* Delete old stuff */		for (dentry =		     fi->csr1212_dirs[dr]->value.directory.dentries_head;		     dentry; dentry = dentry->next) {			csr1212_detach_keyval_from_directory(fi->host->csr.rom->							     root_kv,							     dentry->kv);		}		if (req->req.length == 0) {			csr1212_release_keyval(fi->csr1212_dirs[dr]);			fi->csr1212_dirs[dr] = NULL;			hpsb_update_config_rom_image(fi->host);			free_pending_request(req);			return sizeof(struct raw1394_request);		}	}	cache = csr1212_rom_cache_malloc(0, req->req.length);	if (!cache) {		csr1212_release_keyval(fi->csr1212_dirs[dr]);		fi->csr1212_dirs[dr] = NULL;		return -ENOMEM;	}	cache->filled_head = kmalloc(sizeof(*cache->filled_head), GFP_KERNEL);	if (!cache->filled_head) {		csr1212_release_keyval(fi->csr1212_dirs[dr]);		fi->csr1212_dirs[dr] = NULL;		CSR1212_FREE(cache);		return -ENOMEM;	}	cache->filled_tail = cache->filled_head;	if (copy_from_user(cache->data, int2ptr(req->req.sendb),			   req->req.length)) {		csr1212_release_keyval(fi->csr1212_dirs[dr]);		fi->csr1212_dirs[dr] = NULL;		ret = -EFAULT;	} else {		cache->len = req->req.length;		cache->filled_head->offset_start = 0;		cache->filled_head->offset_end = cache->size - 1;		cache->layout_head = cache->layout_tail = fi->csr1212_dirs[dr];		ret = CSR1212_SUCCESS;		/* parse all the items */		for (kv = cache->layout_head; ret == CSR1212_SUCCESS && kv;		     kv = kv->next) {			ret = csr1212_parse_keyval(kv, cache);		}		/* attach top level items to the root directory */		for (dentry =		     fi->csr1212_dirs[dr]->value.directory.dentries_head;		     ret == CSR1212_SUCCESS && dentry; dentry = dentry->next) {			ret =			    csr1212_attach_keyval_to_directory(fi->host->csr.							       rom->root_kv,							       dentry->kv);		}		if (ret == CSR1212_SUCCESS) {			ret = hpsb_update_config_rom_image(fi->host);			if (ret >= 0 && copy_to_user(int2ptr(req->req.recvb),						     &dr, sizeof(dr))) {				ret = -ENOMEM;			}		}	}	kfree(cache->filled_head);	kfree(cache);	if (ret >= 0) {		/* we have to free the request, because we queue no response,		 * and therefore nobody will free it */		free_pending_request(req);		return sizeof(struct raw1394_request);	} else {		for (dentry =		     fi->csr1212_dirs[dr]->value.directory.dentries_head;		     dentry; dentry = dentry->next) {			csr1212_detach_keyval_from_directory(fi->host->csr.rom->							     root_kv,							     dentry->kv);		}		csr1212_release_keyval(fi->csr1212_dirs[dr]);		fi->csr1212_dirs[dr] = NULL;		return ret;	}}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/b12479ddce4aed112e0018fdf8bbb7cfb349ebdc/raw1394.c/buggy/drivers/ieee1394/raw1394.c