summaryrefslogtreecommitdiff
path: root/sql/hostname.cc
diff options
context:
space:
mode:
authorunknown <monty@hundin.mysql.fi>2002-05-16 16:32:51 +0300
committerunknown <monty@hundin.mysql.fi>2002-05-16 16:32:51 +0300
commitd2b95cd7ab5b3ed450af572e9c77cd11d3c420ba (patch)
tree145820cb9685468167f09ba07a59a1f61ca640cf /sql/hostname.cc
parenteba5ec8b4bceabab302462db850882f715a7b040 (diff)
downloadmariadb-git-d2b95cd7ab5b3ed450af572e9c77cd11d3c420ba.tar.gz
New my_gethostbyname_r() handling
Changed some status variable names Fix bug in GRANT ... PASSWORD string Docs/manual.texi: Update of variable names include/my_net.h: New my_gethostbyname_r() handling include/my_pthread.h: New my_gethostbyname_r() handling libmysql/Makefile.shared: New my_gethostbyname_r() handling libmysql/libmysql.c: New my_gethostbyname_r() handling mysys/Makefile.am: New my_gethostbyname_r() handling mysys/my_pthread.c: New my_gethostbyname_r() handling mysys/my_thr_init.c: New my_gethostbyname_r() handling sql/hostname.cc: New my_gethostbyname_r() handling sql/mini_client.cc: New my_gethostbyname_r() handling sql/mysqld.cc: change some status variable names sql/sql_acl.cc: Fix bug in GRANT ... PASSWORD string
Diffstat (limited to 'sql/hostname.cc')
-rw-r--r--sql/hostname.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/sql/hostname.cc b/sql/hostname.cc
index bc812341337..21dbd5a2bbe 100644
--- a/sql/hostname.cc
+++ b/sql/hostname.cc
@@ -171,17 +171,22 @@ my_string ip_to_hostname(struct in_addr *in, uint *errors)
{
DBUG_PRINT("error",("gethostbyname_r returned %d",tmp_errno));
add_wrong_ip(in);
+ my_gethostbyname_r_free();
DBUG_RETURN(0);
}
if (!hp->h_name[0])
{
DBUG_PRINT("error",("Got an empty hostname"));
add_wrong_ip(in);
+ my_gethostbyname_r_free();
DBUG_RETURN(0); // Don't allow empty hostnames
}
if (!(name=my_strdup(hp->h_name,MYF(0))))
+ {
+ my_gethostbyname_r_free();
DBUG_RETURN(0); // out of memory
-
+ }
+ my_gethostbyname_r_free();
#else
VOID(pthread_mutex_lock(&LOCK_hostname));
if (!(hp=gethostbyaddr((char*) in,sizeof(*in), AF_INET)))