From d17d400489859880c21d056d57322bea0b03e1d7 Mon Sep 17 00:00:00 2001 From: John-Mark Gurney Date: Tue, 4 Jan 2005 18:15:27 +0000 Subject: 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 --- sys/dev/firewire/firewire.c | 1 + 1 file changed, 1 insertion(+) (limited to 'sys/dev/firewire/firewire.c') 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; -- cgit v1.3