diff options
Diffstat (limited to 'libc/misc/regex/regex_old.c')
-rw-r--r-- | libc/misc/regex/regex_old.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/libc/misc/regex/regex_old.c b/libc/misc/regex/regex_old.c index 57b97ae68..7a9c4d7e0 100644 --- a/libc/misc/regex/regex_old.c +++ b/libc/misc/regex/regex_old.c @@ -5132,7 +5132,7 @@ strong_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 @@ -8313,20 +8313,17 @@ void regfree (preg) 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; } #if defined _LIBC || defined __UCLIBC__ |