summaryrefslogtreecommitdiff
path: root/source4/heimdal_build
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-12-11 22:23:20 +0100
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:49:33 +0100
commit70f1f33af8e6e82506d0ee9ff6cc7e0923a7d0a1 (patch)
tree8003912164545843cab60521541e5f068708a5d8 /source4/heimdal_build
parent6f2252dace1629d7b5c5637b103caa28d2c89b07 (diff)
downloadsamba-70f1f33af8e6e82506d0ee9ff6cc7e0923a7d0a1.tar.gz
samba-70f1f33af8e6e82506d0ee9ff6cc7e0923a7d0a1.tar.bz2
samba-70f1f33af8e6e82506d0ee9ff6cc7e0923a7d0a1.zip
r26402: Require a talloc context in libnetif.
(This used to be commit a35e51871bbf1ab33fc316fa59e597b722769c50)
Diffstat (limited to 'source4/heimdal_build')
-rw-r--r--source4/heimdal_build/glue.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source4/heimdal_build/glue.c b/source4/heimdal_build/glue.c
index 809b63f418..07062ae8bf 100644
--- a/source4/heimdal_build/glue.c
+++ b/source4/heimdal_build/glue.c
@@ -33,11 +33,12 @@ krb5_error_code KRB5_LIB_FUNCTION krb5_get_all_client_addrs(krb5_context context
int i;
struct interface *ifaces;
- load_interfaces(lp_interfaces(global_loadparm), &ifaces);
+ load_interfaces(NULL, lp_interfaces(global_loadparm), &ifaces);
res->len = iface_count(ifaces);
res->val = malloc_array_p(HostAddress, res->len);
if (res->val == NULL) {
+ talloc_free(ifaces);
return ENOMEM;
}
for (i=0;i<res->len;i++) {
@@ -46,11 +47,14 @@ krb5_error_code KRB5_LIB_FUNCTION krb5_get_all_client_addrs(krb5_context context
res->val[i].address.length = 4;
res->val[i].address.data = malloc(4);
if (res->val[i].address.data == NULL) {
+ talloc_free(ifaces);
return ENOMEM;
}
((struct in_addr *)res->val[i].address.data)->s_addr = inet_addr(ip);
}
+ talloc_free(ifaces);
+
return 0;
}