git: 9499d3c1e40d - stable/13 - aio_aqueue(): avoid ucred leak on failure path
Konstantin Belousov
kib at FreeBSD.org
Fri Oct 1 00:33:31 UTC 2021
The branch stable/13 has been updated by kib:
URL: https://cgit.FreeBSD.org/src/commit/?id=9499d3c1e40dfeb1f63f61af7cdf25ee27f9a2ec
commit 9499d3c1e40dfeb1f63f61af7cdf25ee27f9a2ec
Author: Konstantin Belousov <kib at FreeBSD.org>
AuthorDate: 2021-09-24 00:14:56 +0000
Commit: Konstantin Belousov <kib at FreeBSD.org>
CommitDate: 2021-10-01 00:32:22 +0000
aio_aqueue(): avoid ucred leak on failure path
PR: 258698
(cherry picked from commit 45c2c7c484de7747014492b17ff89e323ee66496)
---
sys/kern/vfs_aio.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/sys/kern/vfs_aio.c b/sys/kern/vfs_aio.c
index 865eaeee2d13..82fa7990937a 100644
--- a/sys/kern/vfs_aio.c
+++ b/sys/kern/vfs_aio.c
@@ -1709,7 +1709,7 @@ no_kqueue:
else
error = fo_aio_queue(fp, job);
if (error)
- goto err3;
+ goto err4;
AIO_LOCK(ki);
job->jobflags &= ~KAIOCB_QUEUEING;
@@ -1730,6 +1730,8 @@ no_kqueue:
AIO_UNLOCK(ki);
return (0);
+err4:
+ crfree(job->cred);
err3:
if (fp)
fdrop(fp, td);
More information about the dev-commits-src-all
mailing list