mirror of
git://sourceware.org/git/lvm2.git
synced 2024-10-27 01:55:10 +03:00
clang: avoid possible use-after-free
If the 'act' has been already processed by add_client_result() it could have been possibly release - so avoid accessin 'act->' afterward and go for next item directly.
This commit is contained in:
parent
21bdd0a359
commit
51fd232b8e
@ -1800,9 +1800,7 @@ static void res_process(struct lockspace *ls, struct resource *r,
|
||||
act->result = -EINVAL;
|
||||
list_del(&act->list);
|
||||
add_client_result(act);
|
||||
}
|
||||
|
||||
if (act->op == LD_OP_LOCK && act->mode == LD_LK_UN) {
|
||||
} else if (act->op == LD_OP_LOCK && act->mode == LD_LK_UN) {
|
||||
rv = res_unlock(ls, r, act);
|
||||
|
||||
if (rv == -ENOENT && (act->flags & LD_AF_UNLOCK_CANCEL))
|
||||
|
Loading…
Reference in New Issue
Block a user