Sync OpenBSD patchset 1150:

xfree is not particularly helpful, remove it. From Thomas Adam.
This commit is contained in:
Tiago Cunha
2012-07-11 19:34:16 +00:00
parent 06d27e94b2
commit a432fcd306
73 changed files with 330 additions and 360 deletions

View File

@@ -163,7 +163,7 @@ server_start(int lockfd, char *lockfile)
server_client_create(pair[1]);
unlink(lockfile);
xfree(lockfile);
free(lockfile);
close(lockfd);
if (access(SYSTEM_CFG, R_OK) == 0)
@@ -186,7 +186,7 @@ server_start(int lockfd, char *lockfile)
for (i = 0; i < ARRAY_LENGTH(&cfg_causes); i++) {
cause = ARRAY_ITEM(&cfg_causes, i);
window_copy_add(wp, "%s", cause);
xfree(cause);
free(cause);
}
ARRAY_FREE(&cfg_causes);
}
@@ -276,8 +276,8 @@ server_clean_dead(void)
next_s = RB_NEXT(sessions, &dead_sessions, s);
if (s->references == 0) {
RB_REMOVE(sessions, &dead_sessions, s);
xfree(s->name);
xfree(s);
free(s->name);
free(s);
}
s = next_s;
}
@@ -287,7 +287,7 @@ server_clean_dead(void)
if (c == NULL || c->references != 0)
continue;
ARRAY_SET(&dead_clients, i, NULL);
xfree(c);
free(c);
}
}