From ac4ee3e20b3823bb7b6cb35ce8855b8313f0fa8d Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 22 Dec 2005 22:03:25 +0000 Subject: r12440: fix crash bugs metze (This used to be commit c7049f8bb60d075921e1ac4d04bf1a216cd0a5f2) --- source4/nbt_server/wins/winsclient.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'source4/nbt_server/wins') 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); -- cgit