Cleanup patch from Denis Vlasenko. Mostly variants of removing the if(x)
from before "if(x) free(x)".
This commit is contained in:
@@ -902,10 +902,8 @@ gethostinfo(const char *host)
|
||||
static void
|
||||
freehostinfo(struct hostinfo *hi)
|
||||
{
|
||||
if (hi->name != NULL) {
|
||||
free(hi->name);
|
||||
hi->name = NULL;
|
||||
}
|
||||
free(hi->name);
|
||||
hi->name = NULL;
|
||||
free((char *)hi->addrs);
|
||||
free((char *)hi);
|
||||
}
|
||||
|
Reference in New Issue
Block a user