diff options
author | John-Mark Gurney <jmg@FreeBSD.org> | 2005-01-04 18:15:27 +0000 |
---|---|---|
committer | John-Mark Gurney <jmg@FreeBSD.org> | 2005-01-04 18:15:27 +0000 |
commit | d17d400489859880c21d056d57322bea0b03e1d7 (patch) | |
tree | bd8d9cf582c356b43483267cb1754109ca896f28 /sys/dev/firewire | |
parent | b25acc472102d97c6309df1c74ddfbfbfeda67d1 (diff) | |
download | src-d17d400489859880c21d056d57322bea0b03e1d7.tar.gz src-d17d400489859880c21d056d57322bea0b03e1d7.zip |
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
Notes
Notes:
svn path=/head/; revision=139680
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 f2b7164eaf11..0a4a0dde5734 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; |