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
This commit is contained in:
John-Mark Gurney 2005-01-04 18:15:27 +00:00
parent b25acc4721
commit d17d400489
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=139680

View File

@ -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;