d0c3763 Issue 50955 - Fix memory leaks in chaining plugin

Authored and Committed by mreynolds 4 years ago
    Issue 50955 - Fix memory leaks in chaining plugin
    
    Bug Description:  There are many leaks caused by reinitializing a
                      chaining backend, and there are other leaks caused
                      with initialization allocations are not freed in
                      the plugin's close() function.
    
    Fix Description:  Make sure we free pointers before blindly overwriting
                      them, and make sure we call chaining instance free
                      function for all chaining backends when stopping
                      the plugin.
    
    relates: https://pagure.io/389-ds-base/issue/50955
    
    Reviewed by: firstyear(Thanks!)