From: Wilfredo Sanchez Date: Mon, 12 Nov 2001 17:36:38 +0000 (+0000) Subject: Fix leak of NSObjectFileImage handle. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=453ad1057967d42658372342916f168b2b3b44d2;p=thirdparty%2Fapache%2Fhttpd.git Fix leak of NSObjectFileImage handle. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x@91878 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/os/unix/os.c b/src/os/unix/os.c index aff2a94600d..afccc315a98 100644 --- a/src/os/unix/os.c +++ b/src/os/unix/os.c @@ -107,10 +107,13 @@ void *ap_os_dso_load(const char *path) #elif defined(HAVE_DYLD) NSObjectFileImage image; + NSModule handle; if (NSCreateObjectFileImageFromFile(path, &image) != NSObjectFileImageSuccess) return NULL; - return NSLinkModule(image, path, TRUE); + handle = NSLinkModule(image, path, TRUE); + NSDestroyObjectFileImage(image); + return handle; #elif defined(OSF1) || defined(SEQUENT) ||\ (defined(__FreeBSD_version) && (__FreeBSD_version >= 220000))