Accessing previously freed data.



Hello,

I am using a system based on Network Manager 0.7.0.

I see an intermittent problem where for some reason the UDI_REMOVED
message is not received for some reason.  In this case, eventually
nm_device_finalize() is called freeing the priv->udi field (among
others).  Unfortunately the device is still in the priv->devices
list being processed by the hal_manager_udi_added_cb() and
hal_manager_udi_removed_cb() functions in nm_manager.c.  The next
time either of these functions are called they traverse the list
and access the udi field and Network Manager segfaults since that
data has been freed.

I am not able to reproduce this reliably but based on the the last
time I saw it I'm fairly certain that my description is accurate.
Obviously the correct solution is to ensure that the UDI_REMOVED
message is received and processed properly but is there a way to
force this to occur in the nm_device_finalize() routine so that
Network Manager does not crash?

Thanks,
Drew


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]