aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJordan Augé <jordan.auge+fdio@cisco.com>2019-10-23 17:55:00 +0200
committerJordan Augé <jordan.auge+fdio@cisco.com>2019-10-24 00:21:47 +0200
commit8e12c8e42cc9ea9d12e55a3a0d8fbcb211504c04 (patch)
tree1556919c967bd1b6ea664c1f80d6d43efb805f59 /lib
parentcf3d6ef0cbda50c9917421213a77097250f3d67b (diff)
[HICN-352] facemgr event loop enhancement; timer support & async hicn-light interface
Change-Id: I920a0eb091d826e1eb0d1f786fb0b437487f7ff7 Signed-off-by: Jordan Augé <jordan.auge+fdio@cisco.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/src/util/ip_address.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/src/util/ip_address.c b/lib/src/util/ip_address.c
index 7afd3e2a4..c54b1fae6 100644
--- a/lib/src/util/ip_address.c
+++ b/lib/src/util/ip_address.c
@@ -98,19 +98,18 @@ int
ip_address_pton (const char *ip_address_str, ip_address_t * ip_address)
{
int pton_fd;
- char *addr = strdup (ip_address_str);
int family;
- family = ip_address_get_family (addr);
+ family = ip_address_get_family (ip_address_str);
switch (family)
{
case AF_INET6:
- pton_fd = inet_pton (AF_INET6, addr, &ip_address->buffer);
+ pton_fd = inet_pton (AF_INET6, ip_address_str, &ip_address->buffer);
break;
case AF_INET:
- pton_fd = inet_pton (AF_INET, addr, &ip_address->buffer);
+ pton_fd = inet_pton (AF_INET, ip_address_str, &ip_address->buffer);
break;
default:
goto ERR;
@@ -125,7 +124,6 @@ ip_address_pton (const char *ip_address_str, ip_address_t * ip_address)
return 1;
ERR:
- free (addr);
return -1;
}