瀏覽代碼

[PATCH] Remove redundant NULL checks before [kv]free - in kernel/

Remove redundant kfree NULL checks from kernel/

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jesper Juhl 19 年之前
父節點
當前提交
9a66a53f55
共有 1 個文件被更改,包括 1 次插入2 次删除
  1. 1 2
      kernel/auditsc.c

+ 1 - 2
kernel/auditsc.c

@@ -658,8 +658,7 @@ static void audit_log_task_context(struct audit_buffer *ab)
 	return;
 
 error_path:
-	if (ctx)
-		kfree(ctx);
+	kfree(ctx);
 	audit_panic("error in audit_log_task_context");
 	return;
 }