Commit 1a17662e authored by Li Zefan's avatar Li Zefan Committed by Ingo Molnar

blktrace: fix possible memory leak

When we failed to create "block" debugfs dir, we should do some
cleanups.
Signed-off-by: default avatarLi Zefan <lizf@cn.fujitsu.com>
Acked-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
Acked-by: default avatarArnaldo 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: default avatarIngo Molnar <mingo@elte.hu>
parent 22de89b3
...@@ -432,7 +432,7 @@ int do_blk_trace_setup(struct request_queue *q, char *name, dev_t dev, ...@@ -432,7 +432,7 @@ int do_blk_trace_setup(struct request_queue *q, char *name, dev_t dev,
if (!blk_tree_root) { if (!blk_tree_root) {
blk_tree_root = debugfs_create_dir("block", NULL); blk_tree_root = debugfs_create_dir("block", NULL);
if (!blk_tree_root) if (!blk_tree_root)
return -ENOMEM; goto err;
} }
dir = debugfs_create_dir(buts->name, blk_tree_root); dir = debugfs_create_dir(buts->name, blk_tree_root);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment