diff options
Diffstat (limited to 'src')
-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); |