diff options
author | Jakub Jelinek <jakub@redhat.com> | 2005-06-20 15:59:03 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2005-06-20 15:59:03 +0000 |
commit | 27424b29289a49958e62450203f33a57dc1465e2 (patch) | |
tree | 7045409bd7d383127ecac0f78325a2a035b3f754 /dlfcn | |
parent | 841d8c3466e6472c9cd16ee5bff701ba0380998a (diff) | |
download | glibc-27424b29289a49958e62450203f33a57dc1465e2.tar.gz |
Updated to fedora-glibc-20050620T1530
Diffstat (limited to 'dlfcn')
-rw-r--r-- | dlfcn/dlerror.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/dlfcn/dlerror.c b/dlfcn/dlerror.c index 1254381f2b..7ea31d4392 100644 --- a/dlfcn/dlerror.c +++ b/dlfcn/dlerror.c @@ -19,6 +19,7 @@ #include <dlfcn.h> #include <libintl.h> +#include <stdbool.h> #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -40,6 +41,7 @@ struct dl_action_result { int errcode; int returned; + bool malloced; const char *objname; const char *errstring; }; @@ -154,13 +156,13 @@ _dlerror_run (void (*operate) (void *), void *args) { /* Free the error string from the last failed command. This can happen if `dlerror' was not run after an error was found. */ - if (strcmp (result->errstring, "out of memory") != 0) + if (result->malloced) free ((char *) result->errstring); result->errstring = NULL; } result->errcode = GLRO(dl_catch_error) (&result->objname, &result->errstring, - operate, args); + &result->malloced, operate, args); /* If no error we mark that no error string is available. */ result->returned = result->errstring == NULL; |