In sym_attach we call sym_hcb_attach. If it fails we call
sym_free_resources which will call sym_hcb_free. Unfortunately
sym_hcb_attach also calls sym_hcb_free on failure.
This results in a bunch of things being freed twice and it looks like
the sym2 memory allocator adds them to the freelist twice. Sometime later
on we allocate the memory twice, with weird consequences.
*/
return 0;
- /*
- * We have failed.
- * We will try to free all the resources we have
- * allocated, but if we are a boot device, this
- * will not help that much.;)
- */
attach_failed:
- sym_hcb_free(np);
return -ENXIO;
}