This reduces the repetition of the argument, which could be error-prone.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
gr_free(/*@only@*/struct group *grent)
{
free (grent->gr_name);
- if (NULL != grent->gr_passwd) {
- strzero (grent->gr_passwd);
- free (grent->gr_passwd);
- }
+ if (NULL != grent->gr_passwd)
+ free(strzero(grent->gr_passwd));
+
gr_free_members(grent);
free (grent);
}
} else if (strstr (wrapped, newmono) != NULL) {
msg = _("rotated");
}
- strzero (newmono);
- strzero (oldmono);
- strzero (wrapped);
- free (newmono);
- free (oldmono);
- free (wrapped);
+ free(strzero(newmono));
+ free(strzero(oldmono));
+ free(strzero(wrapped));
return msg;
}
failed_conversation:
for (count=0; count < num_msg; count++) {
if (NULL != responses[count].resp) {
- strzero(responses[count].resp);
- free(responses[count].resp);
+ free(strzero(responses[count].resp));
responses[count].resp = NULL;
}
}
{
if (pwent != NULL) {
free (pwent->pw_name);
- if (pwent->pw_passwd) {
- strzero (pwent->pw_passwd);
- free (pwent->pw_passwd);
- }
+ if (pwent->pw_passwd)
+ free(strzero(pwent->pw_passwd));
+
free (pwent->pw_gecos);
free (pwent->pw_dir);
free (pwent->pw_shell);
{
size_t i;
free (sgent->sg_name);
- if (NULL != sgent->sg_passwd) {
- strzero (sgent->sg_passwd);
- free (sgent->sg_passwd);
- }
+ if (NULL != sgent->sg_passwd)
+ free(strzero(sgent->sg_passwd));
+
for (i = 0; NULL != sgent->sg_adm[i]; i++) {
free (sgent->sg_adm[i]);
}
{
if (spent != NULL) {
free (spent->sp_namp);
- if (NULL != spent->sp_pwdp) {
- strzero (spent->sp_pwdp);
- free (spent->sp_pwdp);
- }
+ if (NULL != spent->sp_pwdp)
+ free(strzero(spent->sp_pwdp));
+
free (spent);
}
}