Commit 45c2c7c4 authored by Konstantin Belousov's avatar Konstantin Belousov
Browse files

aio_aqueue(): avoid ucred leak on failure path

PR:	258698
Submitted by:	sigsys@gmail.com
MFC after:	1 week
parent 502dc84a
......@@ -1713,7 +1713,7 @@ aio_aqueue(struct thread *td, struct aiocb *ujob, struct aioliojob *lj,
else
error = fo_aio_queue(fp, job);
if (error)
goto err3;
goto err4;
AIO_LOCK(ki);
job->jobflags &= ~KAIOCB_QUEUEING;
......@@ -1734,6 +1734,8 @@ aio_aqueue(struct thread *td, struct aiocb *ujob, struct aioliojob *lj,
AIO_UNLOCK(ki);
return (0);
err4:
crfree(job->cred);
err3:
if (fp)
fdrop(fp, td);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment