]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] jbd: avoid kfree(NULL)
authorAndrew Morton <akpm@osdl.org>
Fri, 23 Jun 2006 09:05:31 +0000 (02:05 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Fri, 23 Jun 2006 14:43:05 +0000 (07:43 -0700)
commita2a39fa2dc1f773ef37869b2b4a691dbe5f303db
treed5fed361a127e46c1a99d72ef907e1c6b03a1abe
parentfe78de006d009544c7213c1cb531632b529b200a
[PATCH] jbd: avoid kfree(NULL)

There are a couple of places where JBD has to check to see whether an unneeded
memory allocation was performed.  Usually it _was_ needed, so we end up
calling kfree(NULL).  We can micro-optimise that by checking the pointer
before calling kfree().

Thanks to Steven Rostedt <rostedt@goodmis.org> for identifying this.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
fs/jbd/transaction.c