1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00

r12440: fix crash bugs

metze
(This used to be commit c7049f8bb6)
This commit is contained in:
Stefan Metzmacher 2005-12-22 22:03:25 +00:00 committed by Gerald (Jerry) Carter
parent 97113d0508
commit ac4ee3e20b
2 changed files with 12 additions and 0 deletions

View File

@ -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;

View File

@ -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);