projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
58677a1
)
bcachefs: Fix deref of error pointer
author
Kent Overstreet
<kent.overstreet@gmail.com>
Fri, 4 Oct 2019 18:38:41 +0000
(14:38 -0400)
committer
Kent Overstreet
<kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:08:28 +0000
(17:08 -0400)
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/str_hash.h
patch
|
blob
|
history
diff --git
a/fs/bcachefs/str_hash.h
b/fs/bcachefs/str_hash.h
index 31e55acbbeadc9f88ba90cd848468060d10bc797..a81fc3596fc1016bea0dbde95fae9243bd857729 100644
(file)
--- a/
fs/bcachefs/str_hash.h
+++ b/
fs/bcachefs/str_hash.h
@@
-251,9
+251,10
@@
int bch2_hash_set(struct btree_trans *trans,
if (!ret)
ret = -ENOSPC;
out:
- if (
slot
)
+ if (
!IS_ERR_OR_NULL(slot)
)
bch2_trans_iter_put(trans, slot);
- bch2_trans_iter_put(trans, iter);
+ if (!IS_ERR_OR_NULL(iter))
+ bch2_trans_iter_put(trans, iter);
return ret;
found: