From 4b1d91f4ba7ca4cdd49ba489015cd2765162e1bb Mon Sep 17 00:00:00 2001 From: Ezra Peisach Date: Fri, 3 Jan 2003 14:33:46 +0000 Subject: [PATCH] * 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 --- src/include/ChangeLog | 4 ++++ src/include/fake-addrinfo.h | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/include/ChangeLog b/src/include/ChangeLog index dd72428b4..2b6e7d46e 100644 --- a/src/include/ChangeLog +++ b/src/include/ChangeLog @@ -1,3 +1,7 @@ +2003-01-03 Ezra Peisach + + * fake-addrinfo.h (freeaddrinfo): Do not free a NULL pointer. + 2002-12-19 Ken Raeburn * krb5.hin (krb5_encrypt, krb5_decrypt, krb5_use_enctype, diff --git a/src/include/fake-addrinfo.h b/src/include/fake-addrinfo.h index 37dc5ccac..d33f2c970 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); } -- 2.26.2