summaryrefslogtreecommitdiff
path: root/server/uloc.c
diff options
context:
space:
mode:
authorGravatar John Kohl <jtkohl@mit.edu>1988-07-16 15:55:20 +0000
committerGravatar John Kohl <jtkohl@mit.edu>1988-07-16 15:55:20 +0000
commit6b7cc4c46520746256bee5891db0b8bf1872c591 (patch)
treeb519552dc9b5e064f86984d1b19af9d57da313a9 /server/uloc.c
parentdc1aff2b71181e4b64d948c494df33295b8331cf (diff)
was freeing too much
Diffstat (limited to 'server/uloc.c')
-rw-r--r--server/uloc.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/server/uloc.c b/server/uloc.c
index fb3dbb2..7b25aaf 100644
--- a/server/uloc.c
+++ b/server/uloc.c
@@ -438,12 +438,14 @@ struct in_addr *addr;
while (i < num_locs) {
if (locations[i].zlt_addr.s_addr != addr->s_addr)
loc[new_num++] = locations[i];
- else if (zdebug)
+ else {
+ if (zdebug)
syslog(LOG_DEBUG, "uloc hflushing %s/%s/%s",
locations[i].zlt_user,
locations[i].zlt_machine,
locations[i].zlt_tty);
- free_loc(&locations[i]);
+ free_loc(&locations[i]);
+ }
i++;
}
@@ -495,12 +497,14 @@ struct sockaddr_in *sin;
if ((locations[i].zlt_addr.s_addr != sin->sin_addr.s_addr)
|| (locations[i].zlt_port != sin->sin_port))
loc[new_num++] = locations[i];
- else if (zdebug)
+ else {
+ if (zdebug)
syslog(LOG_DEBUG, "uloc cflushing %s/%s/%s",
locations[i].zlt_user,
locations[i].zlt_machine,
locations[i].zlt_tty);
- free_loc(&locations[i]);
+ free_loc(&locations[i]);
+ }
i++;
}
@@ -638,13 +642,13 @@ struct sockaddr_in *who;
oldlocs = locations;
+ omask = sigblock(sigmask(SIGFPE)); /* don't do ascii dumps */
if (!(locations = (ZLocation_t *) xmalloc((num_locs + 1) * sizeof(ZLocation_t)))) {
syslog(LOG_ERR, "zloc mem alloc");
locations = oldlocs;
return;
}
- omask = sigblock(sigmask(SIGFPE)); /* don't do ascii dumps */
if (num_locs == 0) { /* first one */
if (ulogin_setup(notice, locations, exposure, who)) {
xfree(locations);