break;
}
- if (copy)
- free (copy);
+ free (copy);
}
/* Honour LD_HWCAP_MASK. */
write_gmon ();
/* free the memory. */
- if (_gmonparam.tos != NULL)
- free (_gmonparam.tos);
+ free (_gmonparam.tos);
}
__gconv_path_elem = result ?: (struct path_elem *) &empty_path_elem;
- if (cwd != NULL)
- free (cwd);
+ free (cwd);
}
__libc_lock_unlock (lock);
}
}
- if (buf != NULL)
- free (buf);
+ free (buf);
return retval;
}
if (__builtin_expect (result != NULL, 1))
{
- if (binding->codeset != NULL)
- free (binding->codeset);
+ free (binding->codeset);
binding->codeset = result;
modified = 1;
/* This is an invalid revision. */
invalid:
/* This is an invalid .mo file. */
- if (domain->malloced)
- free (domain->malloced);
+ free (domain->malloced);
#ifdef HAVE_MMAP
if (use_mmap)
munmap ((caddr_t) data, size);
if (convd->conv != (__gconv_t) -1)
__gconv_close (convd->conv);
}
- if (domain->conversions != NULL)
- free (domain->conversions);
+ free (domain->conversions);
__libc_rwlock_fini (domain->conversions_lock);
- if (domain->malloced)
- free (domain->malloced);
+ free (domain->malloced);
# ifdef _POSIX_MAPPED_FILES
if (domain->use_mmap)
do
{
- if (ucs4)
- free (ucs4);
+ free (ucs4);
ucs4 = stringprep_utf8_to_ucs4 (in, -1, &ucs4len);
maxucs4len = ucs4len + adducs4len;
uint32_t *newp = realloc (ucs4, maxucs4len * sizeof (uint32_t));
do
{
- if (str)
- free (str);
+ free (str);
str = (char *) malloc (len);
if (str == NULL)
return STRINGPREP_MALLOC_ERROR;
memcpy (new_buffer + avail,
fp->_IO_read_base + least_mark,
needed_size);
- if (fp->_IO_save_base)
- free (fp->_IO_save_base);
+ free (fp->_IO_save_base);
fp->_IO_save_base = new_buffer;
fp->_IO_save_end = new_buffer + avail + needed_size;
}
needed_size * sizeof (wchar_t));
#endif
}
- if (fp->_wide_data->_IO_save_base)
- free (fp->_wide_data->_IO_save_base);
+ free (fp->_wide_data->_IO_save_base);
fp->_wide_data->_IO_save_base = new_buffer;
fp->_wide_data->_IO_save_end = new_buffer + avail + needed_size;
}
col_elem_free:
if (symbol != NULL)
free ((char *) symbol);
- if (arg->val.str.startmb != NULL)
- free (arg->val.str.startmb);
- if (arg->val.str.startwc != NULL)
- free (arg->val.str.startwc);
+ free (arg->val.str.startmb);
+ free (arg->val.str.startwc);
}
lr_ignore_rest (ldfile, 1);
}
else
{
col_sym_free:
- if (symbol != NULL)
- free (symbol);
- if (endsymbol != NULL)
- free (endsymbol);
+ free (symbol);
+ free (endsymbol);
}
}
break;
if (illegal_string)
{
free (buf);
- if (buf2 != NULL)
- free (buf2);
+ free (buf2);
lr->token.val.str.startmb = NULL;
lr->token.val.str.lenmb = 0;
lr->token.val.str.startwc = NULL;
static void
give_pwd_free (struct passwd *pwd)
{
- if (pwd->pw_name != NULL)
- free (pwd->pw_name);
- if (pwd->pw_passwd != NULL)
- free (pwd->pw_passwd);
- if (pwd->pw_gecos != NULL)
- free (pwd->pw_gecos);
- if (pwd->pw_dir != NULL)
- free (pwd->pw_dir);
- if (pwd->pw_shell != NULL)
- free (pwd->pw_shell);
+ free (pwd->pw_name);
+ free (pwd->pw_passwd);
+ free (pwd->pw_gecos);
+ free (pwd->pw_dir);
+ free (pwd->pw_shell);
memset (pwd, '\0', sizeof (struct passwd));
}
static void
give_spwd_free (struct spwd *pwd)
{
- if (pwd->sp_namp != NULL)
- free (pwd->sp_namp);
- if (pwd->sp_pwdp != NULL)
- free (pwd->sp_pwdp);
+ free (pwd->sp_namp);
+ free (pwd->sp_pwdp);
memset (pwd, '\0', sizeof (struct spwd));
pwd->sp_warn = -1;
rrnum++;
}
cleanup:
- if (buf != NULL)
- free(buf);
+ free(buf);
}
/*
else
{
/* Free the earlier space and allocate new area */
- if (xdrs->x_private)
- free (xdrs->x_private);
+ free (xdrs->x_private);
if ((xdrs->x_private = (caddr_t) malloc (len)) == NULL)
{
xdrs->x_base = 0;
x.x_base = (caddr_t) 0;
stat = func (&x, data);
- if (x.x_private)
- free (x.x_private);
+ free (x.x_private);
return stat == TRUE ? x.x_handy : 0;
}
struct if_nameindex *ptr = ifn;
while (ptr->if_name || ptr->if_index)
{
- if (ptr->if_name)
- free (ptr->if_name);
+ free (ptr->if_name);
++ptr;
}
free (ifn);
for (i = 0; i < profcnt; ++i)
if (add_region (p[i], (flags & PROF_UINT) != 0) < 0)
{
- if (prof_info.region)
- free (prof_info.region);
+ free (prof_info.region);
prof_info.num_regions = 0;
prof_info.region = NULL;
return -1;
locale->private.time = NULL;
locale->private.cleanup = NULL;
- if (data->eras != NULL)
- free (data->eras);
- if (data->alt_digits != NULL)
- free (data->alt_digits);
- if (data->walt_digits != NULL)
- free (data->walt_digits);
+ free (data->eras);
+ free (data->alt_digits);
+ free (data->walt_digits);
free (data);
}
tz_rules[1].name = NULL;
/* Save the value of `tz'. */
- if (old_tz != NULL)
- free (old_tz);
+ free (old_tz);
old_tz = tz ? __strdup (tz) : NULL;
/* Try to read a data file. */