OSDN Git Service

blkcg: fix double free of new_blkg in blkcg_init_queue
[sagit-ice-cold/kernel_xiaomi_msm8998.git] / block / blk-cgroup.c
index 8161090..46ba240 100644 (file)
@@ -1078,10 +1078,8 @@ int blkcg_init_queue(struct request_queue *q)
        if (preloaded)
                radix_tree_preload_end();
 
-       if (IS_ERR(blkg)) {
-               blkg_free(new_blkg);
+       if (IS_ERR(blkg))
                return PTR_ERR(blkg);
-       }
 
        q->root_blkg = blkg;
        q->root_rl.blkg = blkg;