From: Li Zefan Date: Fri, 20 Mar 2009 01:47:30 +0000 (+0800) Subject: blktrace: fix possible memory leak X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1a17662ea033674a58bad3603531b0b5d42572f6;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git blktrace: fix possible memory leak When we failed to create "block" debugfs dir, we should do some cleanups. Signed-off-by: Li Zefan Acked-by: Frederic Weisbecker Acked-by: Arnaldo Carvalho de Melo Cc: Jens Axboe Cc: Steven Rostedt LKML-Reference: <49C2F5B2.8000800@cn.fujitsu.com> Signed-off-by: Ingo Molnar --- 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, if (!blk_tree_root) { blk_tree_root = debugfs_create_dir("block", NULL); if (!blk_tree_root) - return -ENOMEM; + goto err; } dir = debugfs_create_dir(buts->name, blk_tree_root);