On Mon, Jul 23, 2018 at 12:43:42PM +0200, Emanuele Giuseppe Esposito wrote:
> The current layout of struct QPCIBusPC provides only one field,
> QPCIBus bus, so passing a NULL pointer to qpci_free_pc()
> makes container_of(NULL, QPCIBusPC, bus)
> returning 0 (NULL), that is correctly handled by
The current layout of struct QPCIBusPC provides only one field,
QPCIBus bus, so passing a NULL pointer to qpci_free_pc()
makes container_of(NULL, QPCIBusPC, bus)
returning 0 (NULL), that is correctly handled by g_free().
This is bad practice, allowing the caller to think that it's okay
to always