diff options
author | stolz <unknown> | 2004-05-13 09:55:59 +0000 |
---|---|---|
committer | stolz <unknown> | 2004-05-13 09:55:59 +0000 |
commit | 6e0a7fe6e8c8934365640a32c987afb07af6a63b (patch) | |
tree | ad7f46b0e8c6047790c6d5a38cec7c31e89fc44f /System | |
parent | aa173516ab4794e6f3aa7c6a80a0578e45947cd5 (diff) |
[project @ 2004-05-13 09:55:59 by stolz]
Inverted logic would call dlerror() after a successful dlclose() and
cause a segfault.
Noticed by: abe.egnor At gmail.com
Diffstat (limited to 'System')
-rw-r--r-- | System/Posix/DynamicLinker.hsc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/System/Posix/DynamicLinker.hsc b/System/Posix/DynamicLinker.hsc index 3068c12..f43d3d7 100644 --- a/System/Posix/DynamicLinker.hsc +++ b/System/Posix/DynamicLinker.hsc @@ -59,7 +59,7 @@ dlopen path flags = do liftM DLHandle $ throwDLErrorIf "dlopen" (== nullPtr) $ c_dlopen p (packRTLDFlags flags) dlclose :: DL -> IO () -dlclose (DLHandle h) = throwDLErrorIf_ "dlclose" (== 0) $ c_dlclose h +dlclose (DLHandle h) = throwDLErrorIf_ "dlclose" (/= 0) $ c_dlclose h dlclose h = error $ "dlclose: invalid argument" ++ (show h) dlerror :: IO String |