summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEzra Peisach <epeisach@mit.edu>2003-01-03 14:33:46 +0000
committerEzra Peisach <epeisach@mit.edu>2003-01-03 14:33:46 +0000
commit4b1d91f4ba7ca4cdd49ba489015cd2765162e1bb (patch)
tree3413ae31b43ae5c8ab2feb9dce8bafa22f632c9c /src
parente1f758d755fff60655b1d3468b5eac665565af95 (diff)
downloadkrb5-4b1d91f4ba7ca4cdd49ba489015cd2765162e1bb.tar.gz
krb5-4b1d91f4ba7ca4cdd49ba489015cd2765162e1bb.tar.xz
krb5-4b1d91f4ba7ca4cdd49ba489015cd2765162e1bb.zip
* fake-addrinfo.h (freeaddrinfo): Do not free a NULL pointer
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15078 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src')
-rw-r--r--src/include/ChangeLog4
-rw-r--r--src/include/fake-addrinfo.h3
2 files changed, 6 insertions, 1 deletions
diff --git a/src/include/ChangeLog b/src/include/ChangeLog
index dd72428b4f..2b6e7d46e7 100644
--- a/src/include/ChangeLog
+++ b/src/include/ChangeLog
@@ -1,3 +1,7 @@
+2003-01-03 Ezra Peisach <epeisach@bu.edu>
+
+ * fake-addrinfo.h (freeaddrinfo): Do not free a NULL pointer.
+
2002-12-19 Ken Raeburn <raeburn@mit.edu>
* krb5.hin (krb5_encrypt, krb5_decrypt, krb5_use_enctype,
diff --git a/src/include/fake-addrinfo.h b/src/include/fake-addrinfo.h
index 37dc5ccac3..d33f2c970d 100644
--- a/src/include/fake-addrinfo.h
+++ b/src/include/fake-addrinfo.h
@@ -940,7 +940,8 @@ void freeaddrinfo (struct addrinfo *ai)
{
#ifdef COPY_FIRST_CANONNAME
if (ai) {
- free(ai->ai_canonname);
+ if (ai->ai_canonname)
+ free(ai->ai_canonname);
ai->ai_canonname = 0;
(*faiptr)(ai);
}