swrap: Call dlclose() in the destructor
authorAndreas Schneider <asn@samba.org>
Mon, 17 Aug 2015 10:14:44 +0000 (12:14 +0200)
committerAndreas Schneider <asn@samba.org>
Mon, 17 Aug 2015 10:15:45 +0000 (12:15 +0200)
Signed-off-by: Andreas Schneider <asn@samba.org>
src/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);
+       }
 }