no_memory_3: 
security_error: kfree(key->description); 
struct key *key_alloc(struct key_type *type, const char *desc,		      uid_t uid, gid_t gid, key_perm_t perm,		      int not_in_quota){	struct key_user *user = NULL;	struct key *key;	size_t desclen, quotalen;	key = ERR_PTR(-EINVAL);	if (!desc || !*desc)		goto error;	desclen = strlen(desc) + 1;	quotalen = desclen + type->def_datalen;	/* get hold of the key tracking for this user */	user = key_user_lookup(uid);	if (!user)		goto no_memory_1;	/* check that the user's quota permits allocation of another key and	 * its description */	if (!not_in_quota) {		spin_lock(&user->lock);		if (user->qnkeys + 1 >= KEYQUOTA_MAX_KEYS &&		    user->qnbytes + quotalen >= KEYQUOTA_MAX_BYTES		    )			goto no_quota;		user->qnkeys++;		user->qnbytes += quotalen;		spin_unlock(&user->lock);	}	/* allocate and initialise the key and its description */	key = kmem_cache_alloc(key_jar, SLAB_KERNEL);	if (!key)		goto no_memory_2;	if (desc) {		key->description = kmalloc(desclen, GFP_KERNEL);		if (!key->description)			goto no_memory_3;		memcpy(key->description, desc, desclen);	}	atomic_set(&key->usage, 1);	init_rwsem(&key->sem);	key->type = type;	key->user = user;	key->quotalen = quotalen;	key->datalen = type->def_datalen;	key->uid = uid;	key->gid = gid;	key->perm = perm;	key->flags = 0;	key->expiry = 0;	key->payload.data = NULL;	if (!not_in_quota)		key->flags |= 1 << KEY_FLAG_IN_QUOTA;	memset(&key->type_data, 0, sizeof(key->type_data));#ifdef KEY_DEBUGGING	key->magic = KEY_DEBUG_MAGIC;#endif	/* publish the key by giving it a serial number */	atomic_inc(&user->nkeys);	key_alloc_serial(key); error:	return key; no_memory_3:	kmem_cache_free(key_jar, key); no_memory_2:	if (!not_in_quota) {		spin_lock(&user->lock);		user->qnkeys--;		user->qnbytes -= quotalen;		spin_unlock(&user->lock);	}	key_user_put(user); no_memory_1:	key = ERR_PTR(-ENOMEM);	goto error; no_quota:	spin_unlock(&user->lock);	key_user_put(user);	key = ERR_PTR(-EDQUOT);	goto error;} /* end key_alloc() */
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/29db9190634067c5a328ee5fcc2890251b836b4b/key.c/clean/security/keys/key.c