diff options
author | jmg <jmg@FreeBSD.org> | 2005-01-04 18:15:27 +0000 |
---|---|---|
committer | jmg <jmg@FreeBSD.org> | 2005-01-04 18:15:27 +0000 |
commit | 04f96285f7fa5e14ce5d31b436cedcd42225e55a (patch) | |
tree | bd8d9cf582c356b43483267cb1754109ca896f28 /sys/dev/firewire | |
parent | d7b7506d382eb84240f4e2bb0fef574282aa172c (diff) | |
download | FreeBSD-src-04f96285f7fa5e14ce5d31b436cedcd42225e55a.zip FreeBSD-src-04f96285f7fa5e14ce5d31b436cedcd42225e55a.tar.gz |
return after freeing data element, instead of falling through, and using
the free'd element, and ultimate NULL deref of the failed allocation.
MFC after: 1 week
Diffstat (limited to 'sys/dev/firewire')
-rw-r--r-- | sys/dev/firewire/firewire.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/dev/firewire/firewire.c b/sys/dev/firewire/firewire.c index f2b7164..0a4a0dd 100644 --- a/sys/dev/firewire/firewire.c +++ b/sys/dev/firewire/firewire.c @@ -812,6 +812,7 @@ void fw_init(struct firewire_comm *fc) fwb = (struct fw_bind *)malloc(sizeof (struct fw_bind), M_FW, M_NOWAIT); if(fwb == NULL){ fw_xfer_free(xfer); + return; } xfer->act.hand = fw_vmaccess; xfer->fc = fc; |