Hm, I didn't think this would be a problem. The sequence is:
- controller allocates memory for slot name
- if core detects a collision:
- it frees the name
- it allocates new memory for name
- it assigns that memory to the name parameter
- controller->release will eventually free the name
So it shouldn't matter if the core frees the original name
pointer and allocates new memory, because the core will change
the pointer for the controller.
This is why I had to change the interface of pci_create_slot()
from taking a const char *name to a char *name.
Is there something I'm missing?
/ac
--