if (buf) kfree(buf); 
kfree(buf); 
static int expkey_parse(struct cache_detail *cd, char *mesg, int mlen){	/* client fsidtype fsid [path] */	char *buf;	int len;	struct auth_domain *dom = NULL;	int err;	int fsidtype;	char *ep;	struct svc_expkey key;	if (mesg[mlen-1] != '\n')		return -EINVAL;	mesg[mlen-1] = 0;	buf = kmalloc(PAGE_SIZE, GFP_KERNEL);	err = -ENOMEM;	if (!buf) goto out;	err = -EINVAL;	if ((len=qword_get(&mesg, buf, PAGE_SIZE)) <= 0)		goto out;	err = -ENOENT;	dom = auth_domain_find(buf);	if (!dom)		goto out;	dprintk("found domain %s\n", buf);	err = -EINVAL;	if ((len=qword_get(&mesg, buf, PAGE_SIZE)) <= 0)		goto out;	fsidtype = simple_strtoul(buf, &ep, 10);	if (*ep)		goto out;	dprintk("found fsidtype %d\n", fsidtype);	if (fsidtype > 2)		goto out;	if ((len=qword_get(&mesg, buf, PAGE_SIZE)) <= 0)		goto out;	dprintk("found fsid length %d\n", len);	if (len != key_len(fsidtype))		goto out;	/* OK, we seem to have a valid key */	key.h.flags = 0;	key.h.expiry_time = get_expiry(&mesg);	if (key.h.expiry_time == 0)		goto out;	key.ek_client = dom;		key.ek_fsidtype = fsidtype;	memcpy(key.ek_fsid, buf, len);	/* now we want a pathname, or empty meaning NEGATIVE  */	if ((len=qword_get(&mesg, buf, PAGE_SIZE)) < 0)		goto out;	dprintk("Path seems to be <%s>\n", buf);	err = 0;	if (len == 0) {		struct svc_expkey *ek;		set_bit(CACHE_NEGATIVE, &key.h.flags);		ek = svc_expkey_lookup(&key, 1);		if (ek)			expkey_put(&ek->h, &svc_expkey_cache);	} else {		struct nameidata nd;		struct svc_expkey *ek;		struct svc_export *exp;		err = path_lookup(buf, 0, &nd);		if (err)			goto out;		dprintk("Found the path %s\n", buf);		exp = exp_get_by_name(dom, nd.mnt, nd.dentry, NULL);		err = -ENOENT;		if (!exp)			goto out_nd;		key.ek_export = exp;		dprintk("And found export\n");				ek = svc_expkey_lookup(&key, 1);		if (ek)			expkey_put(&ek->h, &svc_expkey_cache);		exp_put(exp);		err = 0;	out_nd:		path_release(&nd);	}	cache_flush(); out:	if (dom)		auth_domain_put(dom);	if (buf)		kfree(buf);	return err;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/f99d49adf527fa6f7a9c42257fa76bca6b8df1e3/export.c/buggy/fs/nfsd/export.c