summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <Alan.Coopersmith@sun.com>2006-06-26 17:30:22 +0000
committerAlan Coopersmith <Alan.Coopersmith@sun.com>2006-06-26 17:30:22 +0000
commitff57e5d728c2f409b8852ee58d622c2c3323e2a8 (patch)
tree5d4388999683c70367dfe201304741d748144ad3
parentd03116c682567dac793d52e65a1f0698ae6848f6 (diff)
From Patch #6046 <https://bugs.freedesktop.org/attachment.cgi?id=6046>
freeaddrinfo() in error handling return (Peter Breitenlohner)
-rw-r--r--ChangeLog6
-rw-r--r--src/sm_genid.c6
2 files changed, 11 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 3185f5f..9254bd5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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);