aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2002-01-26 20:03:48 +0000
committerMartin v. Löwis <martin@v.loewis.de>2002-01-26 20:03:48 +0000
commitfb0da9d7709057695087f8ca280904c9ef84b11f (patch)
treed1d9f8a4a750677c3e5bec16c1f25fbf96a439b1 /Python/dynload_hpux.c
parentRemoved an XXX question (the answer is "yes" <wink>). (diff)
downloadcpython-fb0da9d7709057695087f8ca280904c9ef84b11f.tar.gz
cpython-fb0da9d7709057695087f8ca280904c9ef84b11f.tar.bz2
cpython-fb0da9d7709057695087f8ca280904c9ef84b11f.zip
Test for error status of shl_findsym. Fixes #505417. 2.2.1 candiate.
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 cbdb35a240a..6aef796f114 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);