mirror of
https://github.com/opnsense/src.git
synced 2026-06-11 09:41:03 -04:00
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:
parent
8d9c25c4e1
commit
4b77a9a80c
1 changed files with 6 additions and 4 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue