[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LNX.2.00.1108192321130.31857@swampdragon.chaosbits.net>
Date: Fri, 19 Aug 2011 23:30:57 +0200 (CEST)
From: Jesper Juhl <jj@...osbits.net>
To: linux-kernel@...r.kernel.org
cc: linux-ntfs-dev@...ts.sourceforge.net,
Anton Altaparmakov <anton@...era.com>
Subject: [PATCH 0/3] make ntfs_free() NULL safe
Hi
Here's a small series of patches that make it safe to call ntfs_free()
with a NULL pointer and reaps some bennefits from that.
The first patch in the series simply makes ntfs_free() safe to call with a
NULL pointer. This fits with many other kernel freeing functions, that are
generally safe to call with NULL pointers.
The second patch adds some documentation to ntfs_free() similar to what's
already provided for the allocation functions. ntfs_free() is fairly
simple so you could argue that such documentation is not really needed,
but I say it's still nice to have if for no other reason than
completeness.
The third patch removes a number of tests for NULL pointers before calls
to ntfs_free() that patch 1 make redundant.
This whole things came about because Coverity Prevent spotted that in
fs/ntfs/runlist.c on line 967 we call ntfs_runlists_merge() which frees
its second argument and we then explicitly free that argument via
ntfs_free() again on line 970. This patch series also makes that a non
issue.
--
Jesper Juhl <jj@...osbits.net> http://www.chaosbits.net/
Don't top-post http://www.catb.org/jargon/html/T/top-post.html
Plain text mails only, please.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists