i just commited what i believe is a fix for this problem, and for another potential memory leak i saw from inspection.
seems to work for me on an amd64 host, been through several down/up sequences, though i did not force the memory alloc failure directly. (annoyingly, it takes 10-11s to regain link to my switch when doing this down/up sequence.) i'll prepare a pullup for netbsd-10, too. .mrg.