aboutsummaryrefslogtreecommitdiff
path: root/dlfcn/dlerror.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-06-10 04:31:24 +0000
committerUlrich Drepper <drepper@redhat.com>2000-06-10 04:31:24 +0000
commitd743ba1e9bf45b532c18ea437476984c0e2f0c44 (patch)
tree9424ee47f86f76054b196634ca1bafc2745f1fa0 /dlfcn/dlerror.c
parent04470dc03e2d56b1acc0c152d9ad50bdf1066bfa (diff)
downloadglibc-d743ba1e9bf45b532c18ea437476984c0e2f0c44.zip
glibc-d743ba1e9bf45b532c18ea437476984c0e2f0c44.tar.gz
glibc-d743ba1e9bf45b532c18ea437476984c0e2f0c44.tar.bz2
Update.
2000-06-09 H.J. Lu <hjl@gnu.org> * dlfcn/dlerror.c (_dlerror_run): Set result->errstring to NULL after freeing it. * dlfcn/Makefile (distribute): Add failtestmod.c. (tests): Add failtest. Add rules to build and run failtest. * dlfcn/failtest.c: New file. * dlfcn/failtestmod.c: New file.
Diffstat (limited to 'dlfcn/dlerror.c')
-rw-r--r--dlfcn/dlerror.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/dlfcn/dlerror.c b/dlfcn/dlerror.c
index 972a9ac..34ea829 100644
--- a/dlfcn/dlerror.c
+++ b/dlfcn/dlerror.c
@@ -120,9 +120,12 @@ _dlerror_run (void (*operate) (void *), void *args)
}
if (result->errstring != NULL)
- /* Free the error string from the last failed command. This can
- happen if `dlerror' was not run after an error was found. */
- free ((char *) result->errstring);
+ {
+ /* Free the error string from the last failed command. This can
+ happen if `dlerror' was not run after an error was found. */
+ free ((char *) result->errstring);
+ result->errstring = NULL;
+ }
result->errcode = _dl_catch_error (&result->objname, &result->errstring,
operate, args);