mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 22:21:40 +00:00
futex: cleanup error exit
Reuse the put_key_ref(key2) call in the exit path. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:
parent
521c180874
commit
c8b15a706d
@ -2185,10 +2185,8 @@ static int futex_wait_requeue_pi(u32 __user *uaddr, int fshared,
|
||||
|
||||
/* Prepare to wait on uaddr. */
|
||||
ret = futex_wait_setup(uaddr, val, fshared, &q, &hb);
|
||||
if (ret) {
|
||||
put_futex_key(fshared, &key2);
|
||||
goto out;
|
||||
}
|
||||
if (ret)
|
||||
goto out_key2;
|
||||
|
||||
/* Queue the futex_q, drop the hb lock, wait for wakeup. */
|
||||
futex_wait_queue_me(hb, &q, to);
|
||||
@ -2282,6 +2280,7 @@ static int futex_wait_requeue_pi(u32 __user *uaddr, int fshared,
|
||||
|
||||
out_put_keys:
|
||||
put_futex_key(fshared, &q.key);
|
||||
out_key2:
|
||||
put_futex_key(fshared, &key2);
|
||||
|
||||
out:
|
||||
|
Loading…
Reference in New Issue
Block a user