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

(cherry picked from commit 4b77a9a80cf8a9cba5607d8d8fa0742334dcf0f4)
This commit is contained in:
Jose Luis Duran 2025-02-12 15:31:43 +00:00
parent 73dd56ffcd
commit 9fcb7c640e
No known key found for this signature in database
GPG key ID: 5415E244477475CC

View file

@ -2303,10 +2303,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;