bhyve/audio: don't leak resources on failed initialization.
Coverity CID: 1402793 Approved by: markj, jhb, bhyve Differential Revision: https://reviews.freebsd.org/D20841
This commit is contained in:
parent
9a499315ee
commit
88bb3225d5
@ -103,6 +103,7 @@ audio_init(const char *dev_name, uint8_t dir)
|
||||
if (aud->fd == -1) {
|
||||
DPRINTF("Failed to open dev: %s, errno: %d\n",
|
||||
aud->dev_name, errno);
|
||||
free(aud);
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user