mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
sound: Correctly check nvlist_unpack() error
The current check is never false and if nvlist_unpack() fails, we might panic later down the road. PR: 266144 Sponsored by: The FreeBSD Foundation MFC after: 1 day Reviewed by: dev_submerge.ch, emaste Differential Revision: https://reviews.freebsd.org/D45237 (cherry picked from commit 64f4e2db6d19d8ab520903a197fcaa8cc7ab9f9a)
This commit is contained in:
parent
5830a00c2c
commit
45feaa73c6
1 changed files with 1 additions and 1 deletions
|
|
@ -705,7 +705,7 @@ sndstat_unpack_user_nvlbuf(const void *unvlbuf, size_t nbytes, nvlist_t **nvl)
|
|||
}
|
||||
*nvl = nvlist_unpack(nvlbuf, nbytes, 0);
|
||||
free(nvlbuf, M_DEVBUF);
|
||||
if (nvl == NULL) {
|
||||
if (*nvl == NULL) {
|
||||
return (EINVAL);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue