namebrowse.c was using variable work uninitialised.
[samba.git] / source / namebrowse.c
index 31ee9347ec5e988e6f305595a45284bb5b1930d9..4b3e691ce04b5deb76495051c9ac87b2ebc9c489 100644 (file)
@@ -167,6 +167,8 @@ static void start_sync_browse_entry(struct browse_cache_record *b)
 
   if (!(d = find_subnet(b->ip))) return;
 
+  if (!(work = find_workgroupstruct(d, b->group, False))) return;
+
   /* only sync if we are the master */
   if (AM_MASTER(work)) {