mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Fixed a memory leak.
Submitted by: Stanford Metacompilation research group
This commit is contained in:
parent
7c633af872
commit
b659f64e82
1 changed files with 3 additions and 1 deletions
|
|
@ -508,8 +508,10 @@ sioprobe(dev, xrid, rclk, noprobe)
|
|||
return (ENXIO);
|
||||
|
||||
com = malloc(sizeof(*com), M_DEVBUF, M_NOWAIT | M_ZERO);
|
||||
if (com == NULL)
|
||||
if (com == NULL) {
|
||||
bus_release_resource(dev, SYS_RES_IOPORT, rid, port);
|
||||
return (ENOMEM);
|
||||
}
|
||||
device_set_softc(dev, com);
|
||||
com->bst = rman_get_bustag(port);
|
||||
com->bsh = rman_get_bushandle(port);
|
||||
|
|
|
|||
Loading…
Reference in a new issue