projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dbac8fe
)
bcachefs: fix tiny leak in bch2_dev_add()
author
Kent Overstreet
<kent.overstreet@linux.dev>
Wed, 12 Mar 2025 21:21:31 +0000
(17:21 -0400)
committer
Kent Overstreet
<kent.overstreet@linux.dev>
Thu, 13 Mar 2025 04:23:19 +0000
(
00:23
-0400)
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/super.c
patch
|
blob
|
history
diff --git
a/fs/bcachefs/super.c
b/fs/bcachefs/super.c
index
6d97d41
..
0459c87
100644
(file)
--- a/
fs/bcachefs/super.c
+++ b/
fs/bcachefs/super.c
@@
-1811,7
+1811,11
@@
int bch2_dev_add(struct bch_fs *c, const char *path)
goto err_late;
up_write(&c->state_lock);
- return 0;
+out:
+ printbuf_exit(&label);
+ printbuf_exit(&errbuf);
+ bch_err_fn(c, ret);
+ return ret;
err_unlock:
mutex_unlock(&c->sb_lock);
@@
-1820,10
+1824,7
@@
err:
if (ca)
bch2_dev_free(ca);
bch2_free_super(&sb);
- printbuf_exit(&label);
- printbuf_exit(&errbuf);
- bch_err_fn(c, ret);
- return ret;
+ goto out;
err_late:
up_write(&c->state_lock);
ca = NULL;