summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/namedbname.c2
-rw-r--r--source3/namedbresp.c2
-rw-r--r--source3/namedbwork.c4
3 files changed, 7 insertions, 1 deletions
diff --git a/source3/namedbname.c b/source3/namedbname.c
index c91541cc81..a45a749f14 100644
--- a/source3/namedbname.c
+++ b/source3/namedbname.c
@@ -486,6 +486,8 @@ struct name_record *add_netbios_entry(struct subnet_record *d,
return NULL;
}
+ bzero((char *)n->ip_flgs, sizeof(*n->ip_flgs) * n->num_ips);
+
make_nmb_name(&n->name,name,type,scope);
if ((n2 = find_name_search(&found_subnet, &n->name, search, new_only?ipzero:ip)))
diff --git a/source3/namedbresp.c b/source3/namedbresp.c
index 98f8ca774b..86d7eddbd4 100644
--- a/source3/namedbresp.c
+++ b/source3/namedbresp.c
@@ -104,6 +104,8 @@ struct response_record *make_response_queue_record(enum state_type state,
if (!(n = (struct response_record *)malloc(sizeof(*n))))
return(NULL);
+ bzero((char *)n, sizeof(*n));
+
n->response_id = id;
n->state = state;
n->fd = fd;
diff --git a/source3/namedbwork.c b/source3/namedbwork.c
index 2982ffd3e7..a6260aab46 100644
--- a/source3/namedbwork.c
+++ b/source3/namedbwork.c
@@ -84,7 +84,8 @@ static struct work_record *make_workgroup(char *name)
work = (struct work_record *)malloc(sizeof(*work));
if (!work) return(NULL);
-
+ bzero((char *)work, sizeof(*work));
+
StrnCpy(work->work_group,name,sizeof(work->work_group)-1);
work->serverlist = NULL;
@@ -92,6 +93,7 @@ static struct work_record *make_workgroup(char *name)
SV_TYPE_POTENTIAL_BROWSER : 0 );
work->RunningElection = False;
work->ElectionCount = 0;
+ work->announce_interval = 0;
work->needelection = False;
work->needannounce = True;
work->mst_state = MST_POTENTIAL;