sk_addr_free(disp->addr);
sfree(disp->hostname);
sfree(disp->unixsocketpath);
+ sfree(disp);
return NULL; /* FIXME: report an error */
}
}
sfree(disp->hostname);
sfree(disp->unixsocketpath);
if (disp->localauthdata)
- memset(disp->localauthdata, 0, disp->localauthdatalen);
+ smemclr(disp->localauthdata, disp->localauthdatalen);
sfree(disp->localauthdata);
if (disp->remoteauthdata)
- memset(disp->remoteauthdata, 0, disp->remoteauthdatalen);
+ smemclr(disp->remoteauthdata, disp->remoteauthdatalen);
sfree(disp->remoteauthdata);
sfree(disp->remoteauthprotoname);
sfree(disp->remoteauthdatastring);
int len[4];
int family, protocol;
int ideal_match = FALSE;
- char *ourhostname = get_hostname();
+ char *ourhostname;
/*
* Normally we should look for precisely the details specified in
if (!authfp)
return;
+ ourhostname = get_hostname();
+
/* Records in .Xauthority contain four strings of up to 64K each */
buf = snewn(65537 * 4, char);
done:
fclose(authfp);
- memset(buf, 0, 65537 * 4);
+ smemclr(buf, 65537 * 4);
sfree(buf);
sfree(ourhostname);
}