summaryrefslogtreecommitdiff
path: root/source4/nbt_server/wins
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2005-12-22 22:03:25 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:47:39 -0500
commitac4ee3e20b3823bb7b6cb35ce8855b8313f0fa8d (patch)
tree5847005f4abca8edc77026284f5f6aa70df28fa0 /source4/nbt_server/wins
parent97113d050841adbc9997f5ac725b9185ade86efa (diff)
downloadsamba-ac4ee3e20b3823bb7b6cb35ce8855b8313f0fa8d.tar.gz
samba-ac4ee3e20b3823bb7b6cb35ce8855b8313f0fa8d.tar.bz2
samba-ac4ee3e20b3823bb7b6cb35ce8855b8313f0fa8d.zip
r12440: fix crash bugs
metze (This used to be commit c7049f8bb60d075921e1ac4d04bf1a216cd0a5f2)
Diffstat (limited to 'source4/nbt_server/wins')
-rw-r--r--source4/nbt_server/wins/winsclient.c9
1 files changed, 9 insertions, 0 deletions
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);