summaryrefslogtreecommitdiffstats
path: root/Python/dynload_hpux.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/dynload_hpux.c')
-rw-r--r--Python/dynload_hpux.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/Python/dynload_hpux.c b/Python/dynload_hpux.c
index cbdb35a..6aef796 100644
--- a/Python/dynload_hpux.c
+++ b/Python/dynload_hpux.c
@@ -47,7 +47,10 @@ dl_funcptr _PyImport_GetDynLoadFunc(const char *fqname, const char *shortname,
PyOS_snprintf(funcname, sizeof(funcname), FUNCNAME_PATTERN, shortname);
if (Py_VerboseFlag)
printf("shl_findsym %s\n", funcname);
- shl_findsym(&lib, funcname, TYPE_UNDEFINED, (void *) &p);
+ if (shl_findsym(&lib, funcname, TYPE_UNDEFINED, (void *) &p) == -1) {
+ shl_unload(lib);
+ p = NULL;
+ }
if (p == NULL && Py_VerboseFlag)
perror(funcname);