diff options
author | Stefan Metzmacher <metze@samba.org> | 2005-12-22 22:03:25 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:47:39 -0500 |
commit | ac4ee3e20b3823bb7b6cb35ce8855b8313f0fa8d (patch) | |
tree | 5847005f4abca8edc77026284f5f6aa70df28fa0 /source4/nbt_server | |
parent | 97113d050841adbc9997f5ac725b9185ade86efa (diff) | |
download | samba-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')
-rw-r--r-- | source4/nbt_server/interfaces.c | 3 | ||||
-rw-r--r-- | source4/nbt_server/wins/winsclient.c | 9 |
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); |