* fake-addrinfo.h (freeaddrinfo): Do not free a NULL pointer
authorEzra Peisach <epeisach@mit.edu>
Fri, 3 Jan 2003 14:33:46 +0000 (14:33 +0000)
committerEzra Peisach <epeisach@mit.edu>
Fri, 3 Jan 2003 14:33:46 +0000 (14:33 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15078 dc483132-0cff-0310-8789-dd5450dbe970

src/include/ChangeLog
src/include/fake-addrinfo.h

index dd72428b4f58867194b05c109a2271dfd5ca46ca..2b6e7d46e74ef3779978599170309fa2f6137864 100644 (file)
@@ -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,
index 37dc5ccac3eaa3fe4aae909e0494568dae2dbbb2..d33f2c970d61c48ce00ab3bbe68e12bfce64173d 100644 (file)
@@ -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);
     }