]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Fix leak of NSObjectFileImage handle.
authorWilfredo Sanchez <wsanchez@apache.org>
Mon, 12 Nov 2001 17:36:38 +0000 (17:36 +0000)
committerWilfredo Sanchez <wsanchez@apache.org>
Mon, 12 Nov 2001 17:36:38 +0000 (17:36 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x@91878 13f79535-47bb-0310-9956-ffa450edef68

src/os/unix/os.c

index aff2a94600dd436650dd2a6d38c2faf761df1c21..afccc315a98f9dcd0fb59fe3714cb41dd08e9b3c 100644 (file)
@@ -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))