(doit): only free hp if != NULL. From: Jonas Oberg <jonas@coyote.org>
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@6678 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -663,7 +663,7 @@ static void
|
|||||||
doit(struct sockaddr *who, int who_len)
|
doit(struct sockaddr *who, int who_len)
|
||||||
{
|
{
|
||||||
char *host = NULL;
|
char *host = NULL;
|
||||||
struct hostent *hp;
|
struct hostent *hp = NULL;
|
||||||
int level;
|
int level;
|
||||||
int ptynum;
|
int ptynum;
|
||||||
char user_name[256];
|
char user_name[256];
|
||||||
@@ -741,7 +741,8 @@ Please contact your net administrator");
|
|||||||
* to also do a gethost* and overwrite the static data...
|
* to also do a gethost* and overwrite the static data...
|
||||||
*/
|
*/
|
||||||
strcpy_truncate(remote_host_name, host, sizeof(remote_host_name));
|
strcpy_truncate(remote_host_name, host, sizeof(remote_host_name));
|
||||||
freehostent (hp);
|
if (hp != NULL)
|
||||||
|
freehostent (hp);
|
||||||
host = remote_host_name;
|
host = remote_host_name;
|
||||||
|
|
||||||
/* XXX - should be k_gethostname? */
|
/* XXX - should be k_gethostname? */
|
||||||
|
Reference in New Issue
Block a user