summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/nbt_server/interfaces.c3
-rw-r--r--source4/nbt_server/wins/winsclient.c9
2 files changed, 12 insertions, 0 deletions
diff --git a/source4/nbt_server/interfaces.c b/source4/nbt_server/interfaces.c
index 4ef2afb8ee..f2ccc1c424 100644
--- a/source4/nbt_server/interfaces.c
+++ b/source4/nbt_server/interfaces.c
@@ -279,6 +279,9 @@ const char **nbtd_address_list(struct nbtd_interface *iface, TALLOC_CTX *mem_ctx
if (ret[count] == NULL) goto failed;
count++;
}
+
+ if (ret == NULL) goto failed;
+
ret[count] = NULL;
return ret;
diff --git a/source4/nbt_server/wins/winsclient.c b/source4/nbt_server/wins/winsclient.c
index fdfdc8f0ed..6bf328d146 100644
--- a/source4/nbt_server/wins/winsclient.c
+++ b/source4/nbt_server/wins/winsclient.c
@@ -127,6 +127,11 @@ static void nbtd_wins_refresh(struct event_context *ev, struct timed_event *te,
io.in.nb_flags = iname->nb_flags;
io.in.ttl = iname->ttl;
+ if (!io.in.addresses) {
+ talloc_free(tmp_ctx);
+ return;
+ }
+
c = nbt_name_refresh_wins_send(wins_socket(iface), &io);
if (c == NULL) {
talloc_free(tmp_ctx);
@@ -218,6 +223,10 @@ void nbtd_winsclient_register(struct nbtd_iface_name *iname)
io.in.nb_flags = iname->nb_flags;
io.in.ttl = iname->ttl;
+ if (!io.in.addresses) {
+ return;
+ }
+
c = nbt_name_register_wins_send(wins_socket(iface), &io);
if (c == NULL) {
talloc_free(io.in.addresses);