diff options
Diffstat (limited to 'src/wpad.c')
-rw-r--r-- | src/wpad.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -147,12 +147,15 @@ int __connman_wpad_start(struct connman_service *service) return -EINVAL; wpad = g_try_new0(struct connman_wpad, 1); - if (wpad == NULL) + if (wpad == NULL) { + g_strfreev(nameservers); return -ENOMEM; + } wpad->service = service; wpad->resolv = g_resolv_new(index); if (wpad->resolv == NULL) { + g_strfreev(nameservers); g_free(wpad); return -ENOMEM; } @@ -163,6 +166,8 @@ int __connman_wpad_start(struct connman_service *service) for (i = 0; nameservers[i] != NULL; i++) g_resolv_add_nameserver(wpad->resolv, nameservers[i], 53, 0); + g_strfreev(nameservers); + wpad->hostname = g_strdup_printf("wpad.%s", domainname); DBG("hostname %s", wpad->hostname); |