diff options
author | ru <ru@FreeBSD.org> | 2004-01-18 12:26:33 +0000 |
---|---|---|
committer | ru <ru@FreeBSD.org> | 2004-01-18 12:26:33 +0000 |
commit | 7a1096b2a1f013c8138761e414fb815c262d069f (patch) | |
tree | 0408ce75d7e54ea5cf6aef6a0633d1daad3aa2e4 /sys/dev/sio/sio.c | |
parent | 523bdbcc21b13b6c036d93da5f5ff3ca8810675a (diff) | |
download | FreeBSD-src-7a1096b2a1f013c8138761e414fb815c262d069f.zip FreeBSD-src-7a1096b2a1f013c8138761e414fb815c262d069f.tar.gz |
Fixed a memory leak.
Submitted by: Stanford Metacompilation research group
Diffstat (limited to 'sys/dev/sio/sio.c')
-rw-r--r-- | sys/dev/sio/sio.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/sio/sio.c b/sys/dev/sio/sio.c index bd842f4..be51ac3 100644 --- a/sys/dev/sio/sio.c +++ b/sys/dev/sio/sio.c @@ -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); |