diff options
author | DJ Delorie <dj@redhat.com> | 2011-04-20 19:06:46 +0000 |
---|---|---|
committer | DJ Delorie <dj@redhat.com> | 2011-04-20 19:06:46 +0000 |
commit | 4ff224cb8d9347245ffea0f5853d862f0574452e (patch) | |
tree | f0ad924656bb6f1332030f73e18939949db327f0 /libiberty/regex.c | |
parent | e7782cf63b834cc4c4d159dcb6e3a9908b12432f (diff) | |
download | gdb-4ff224cb8d9347245ffea0f5853d862f0574452e.zip gdb-4ff224cb8d9347245ffea0f5853d862f0574452e.tar.gz gdb-4ff224cb8d9347245ffea0f5853d862f0574452e.tar.bz2 |
merge from gcc
Diffstat (limited to 'libiberty/regex.c')
-rw-r--r-- | libiberty/regex.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/libiberty/regex.c b/libiberty/regex.c index 420c7f4..d65eedb 100644 --- a/libiberty/regex.c +++ b/libiberty/regex.c @@ -4970,7 +4970,7 @@ weak_alias (__re_search_2, re_search_2) #ifdef MATCH_MAY_ALLOCATE # define FREE_VAR(var) if (var) REGEX_FREE (var); var = NULL #else -# define FREE_VAR(var) if (var) free (var); var = NULL +# define FREE_VAR(var) free (var); var = NULL #endif #ifdef WCHAR @@ -8111,20 +8111,17 @@ weak_alias (__regerror, regerror) void regfree (regex_t *preg) { - if (preg->buffer != NULL) - free (preg->buffer); + free (preg->buffer); preg->buffer = NULL; preg->allocated = 0; preg->used = 0; - if (preg->fastmap != NULL) - free (preg->fastmap); + free (preg->fastmap); preg->fastmap = NULL; preg->fastmap_accurate = 0; - if (preg->translate != NULL) - free (preg->translate); + free (preg->translate); preg->translate = NULL; } #ifdef _LIBC |