aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorLi Zefan <lizf@cn.fujitsu.com>2009-03-19 21:47:30 -0400
committerIngo Molnar <mingo@elte.hu>2009-03-21 11:15:47 -0400
commit1a17662ea033674a58bad3603531b0b5d42572f6 (patch)
tree157c7cdeab1192136f94ffe8098a368aea9c1437 /kernel
parent22de89b371a18086162eacd9f8c960299334ab01 (diff)
blktrace: fix possible memory leak
When we failed to create "block" debugfs dir, we should do some cleanups. Signed-off-by: Li Zefan <lizf@cn.fujitsu.com> Acked-by: Frederic Weisbecker <fweisbec@gmail.com> Acked-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Jens Axboe <jens.axboe@oracle.com> Cc: Steven Rostedt <rostedt@goodmis.org> LKML-Reference: <49C2F5B2.8000800@cn.fujitsu.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/trace/blktrace.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c
index b171778e3863..fb3bc53835dd 100644
--- a/kernel/trace/blktrace.c
+++ b/kernel/trace/blktrace.c
@@ -432,7 +432,7 @@ int do_blk_trace_setup(struct request_queue *q, char *name, dev_t dev,
432 if (!blk_tree_root) { 432 if (!blk_tree_root) {
433 blk_tree_root = debugfs_create_dir("block", NULL); 433 blk_tree_root = debugfs_create_dir("block", NULL);
434 if (!blk_tree_root) 434 if (!blk_tree_root)
435 return -ENOMEM; 435 goto err;
436 } 436 }
437 437
438 dir = debugfs_create_dir(buts->name, blk_tree_root); 438 dir = debugfs_create_dir(buts->name, blk_tree_root);