diff options
author | Jeremy Allison <jra@samba.org> | 2008-01-11 23:56:48 -0800 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2008-01-11 23:56:48 -0800 |
commit | ff98a654d613daad484023250c6619ce09917f6e (patch) | |
tree | bc8d07a343042d64558af0bd99887f84b3e02710 | |
parent | 43717a16e2fca8b196d4a89e33b05fefc0cb02d2 (diff) | |
download | samba-ff98a654d613daad484023250c6619ce09917f6e.tar.gz samba-ff98a654d613daad484023250c6619ce09917f6e.tar.bz2 samba-ff98a654d613daad484023250c6619ce09917f6e.zip |
Fix CID 475. work should not be checked against NULL
here as it can never be null.
Jeremy.
(This used to be commit ecb52f50fe3ec8beda48b6c88e9a3ae5a6a98d52)
-rw-r--r-- | source3/nmbd/nmbd_incomingdgrams.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/nmbd/nmbd_incomingdgrams.c b/source3/nmbd/nmbd_incomingdgrams.c index c0aa385ff6..75ab9419c2 100644 --- a/source3/nmbd/nmbd_incomingdgrams.c +++ b/source3/nmbd/nmbd_incomingdgrams.c @@ -257,7 +257,7 @@ void process_local_master_announce(struct subnet_record *subrec, struct packet_s uint32 servertype = IVAL(buf,23); fstring comment; unstring work_name; - struct work_record *work; + struct work_record *work = NULL; struct server_record *servrec; unstring source_name; @@ -344,7 +344,7 @@ a local master browser for workgroup %s and we think we are master. Forcing elec * This server is announcing it is going down. Remove it from the * workgroup. */ - if(!is_myname(server_name) && (work != NULL) && + if(!is_myname(server_name) && ((servrec = find_server_in_workgroup( work, server_name))!=NULL)) { remove_server_from_workgroup( work, servrec); } |