15f848d Fix multiple errors with destructors.

1 file Authored by simo 14 years ago, Committed by sgallagh 14 years ago,
    Fix multiple errors with destructors.
    
    This commits cleans up 3 segfaults/valgrind errors due to access
    to freed memory.
    
    1. The spy wasn't clearing conn_spy causing the svc_destructor to try
       to clear the spy destructor when the spy was already freed
    
    2. get_config_service was not setting the svc_destrcutor on services
       depending on the orderof frees at exit this was causing the spy
       destructor to try to access freed memory because it was not
       neutralized when the service was freed.
    
    3. at exit the mt_ctx could be freed before services causing the
       svc_destrcutor to try to access freed memory when removing the
       service from the service list in the monitor context.
    
        
file modified
+22 -2