From d743ba1e9bf45b532c18ea437476984c0e2f0c44 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 10 Jun 2000 04:31:24 +0000 Subject: Update. 2000-06-09 H.J. Lu * 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. --- dlfcn/dlerror.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'dlfcn/dlerror.c') diff --git a/dlfcn/dlerror.c b/dlfcn/dlerror.c index 972a9ac263..34ea82907e 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); -- cgit 1.4.1