瀏覽代碼

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6:
  kernel/cred.c: use kmem_cache_free
Linus Torvalds 15 年之前
父節點
當前提交
c80d292f13
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      kernel/cred.c

+ 1 - 1
kernel/cred.c

@@ -224,7 +224,7 @@ struct cred *cred_alloc_blank(void)
 #ifdef CONFIG_KEYS
 #ifdef CONFIG_KEYS
 	new->tgcred = kzalloc(sizeof(*new->tgcred), GFP_KERNEL);
 	new->tgcred = kzalloc(sizeof(*new->tgcred), GFP_KERNEL);
 	if (!new->tgcred) {
 	if (!new->tgcred) {
-		kfree(new);
+		kmem_cache_free(cred_jar, new);
 		return NULL;
 		return NULL;
 	}
 	}
 	atomic_set(&new->tgcred->usage, 1);
 	atomic_set(&new->tgcred->usage, 1);