uath: Avoid a NULL dereference

PR:		284643
Reviewed by:	adrian
Approved by:	emaste (mentor)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D48948
This commit is contained in:
Jose Luis Duran 2025-02-12 15:31:43 +00:00
parent 8d9c25c4e1
commit 4b77a9a80c
No known key found for this signature in database
GPG key ID: 5415E244477475CC

View file

@ -2308,10 +2308,12 @@ uath_cmdeof(struct uath_softc *sc, struct uath_cmd *cmd)
__func__, dlen, sizeof(uint32_t));
return;
}
/* XXX have submitter do this */
/* copy answer into caller's supplied buffer */
bcopy(hdr+1, cmd->odata, sizeof(uint32_t));
cmd->olen = sizeof(uint32_t);
if (cmd->odata != NULL) {
/* XXX have submitter do this */
/* copy answer into caller's supplied buffer */
bcopy(hdr+1, cmd->odata, sizeof(uint32_t));
cmd->olen = sizeof(uint32_t);
}
wakeup_one(cmd); /* wake up caller */
break;