diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | src/sm_genid.c | 6 |
2 files changed, 11 insertions, 1 deletions
@@ -1,3 +1,9 @@ +2006-06-26 Alan Coopersmith <alan.coopersmith@sun.com> + + * src/sm_genid.c: + From Patch #6046 <https://bugs.freedesktop.org/attachment.cgi?id=6046> + freeaddrinfo() in error handling return (Peter Breitenlohner) + 2006-04-26 Adam Jackson <ajax@freedesktop.org> * configure.ac: diff --git a/src/sm_genid.c b/src/sm_genid.c index 76e1350..bf06644 100644 --- a/src/sm_genid.c +++ b/src/sm_genid.c @@ -179,8 +179,12 @@ SmsGenerateClientID (smsConn) { ptr2 = strchr (ptr1, '.'); len = ptr2 - ptr1; - if (!ptr2 || len > 3) + if (!ptr2 || len > 3) { +#if defined(IPv6) && defined(AF_INET6) + freeaddrinfo(first_ai); +#endif return (NULL); + } strncpy (temp, ptr1, len); temp[len] = '\0'; decimal[i] = atoi (temp); |