aboutsummaryrefslogtreecommitdiff
path: root/lib/string_helpers.c
diff options
context:
space:
mode:
authorArtem Bityutskiy <[email protected]>2010-10-26 14:23:07 -0700
committerLinus Torvalds <[email protected]>2010-10-26 16:52:19 -0700
commitf3dc0e384248ea6fda0987f909007fa9ab5fb51a (patch)
tree1c834baf780e16a9e47d1cacd41498dbb361483a /lib/string_helpers.c
parenteeee9ebb54b76a33a13d2c926ffb018a4aea410f (diff)
lib/list_sort: test: improve errors handling
The 'lib_sort()' test does not free memory if it fails, and it makes the kernel panic if it cannot allocate memory. This patch fixes the problem. This patch also changes several small things: o use 'list_add()' helper instead of adding manually o introduce temporary 'el1' variable to avoid ugly and unreadalbe "if" statement o make 'head' to be stack variable instead of 'kmalloc()'ed, which simplifies code a bit Overall, this patch is of clean-up type. Signed-off-by: Artem Bityutskiy <[email protected]> Cc: Don Mullis <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'lib/string_helpers.c')
0 files changed, 0 insertions, 0 deletions