diff options
author | Alan Coopersmith <Alan.Coopersmith@sun.com> | 2006-06-26 17:30:22 +0000 |
---|---|---|
committer | Alan Coopersmith <Alan.Coopersmith@sun.com> | 2006-06-26 17:30:22 +0000 |
commit | ff57e5d728c2f409b8852ee58d622c2c3323e2a8 (patch) | |
tree | 5d4388999683c70367dfe201304741d748144ad3 /src/sm_genid.c | |
parent | d03116c682567dac793d52e65a1f0698ae6848f6 (diff) |
From Patch #6046 <https://bugs.freedesktop.org/attachment.cgi?id=6046>
freeaddrinfo() in error handling return (Peter Breitenlohner)
Diffstat (limited to 'src/sm_genid.c')
-rw-r--r-- | src/sm_genid.c | 6 |
1 files changed, 5 insertions, 1 deletions
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); |