swrap: Call dlclose() in the destructor
authorAndreas Schneider <asn@samba.org>
Tue, 25 Aug 2015 15:21:33 +0000 (17:21 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Tue, 8 Sep 2015 11:47:20 +0000 (13:47 +0200)
Signed-off-by: Andreas Schneider <asn@samba.org>
lib/socket_wrapper/socket_wrapper.c

index 12eb010ae2a807445bdc733d6d84d7797e238b5d..45282edeea0e434d81a55f4551ae2d3159fbb340 100644 (file)
@@ -5131,4 +5131,11 @@ void swrap_destructor(void)
                }
                s = sockets;
        }
+
+       if (swrap.libc_handle != NULL) {
+               dlclose(swrap.libc_handle);
+       }
+       if (swrap.libsocket_handle) {
+               dlclose(swrap.libsocket_handle);
+       }
 }