mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
Fix CID 475. work should not be checked against NULL
here as it can never be null. Jeremy.
This commit is contained in:
parent
0599d57eff
commit
ecb52f50fe
@ -257,7 +257,7 @@ void process_local_master_announce(struct subnet_record *subrec, struct packet_s
|
|||||||
uint32 servertype = IVAL(buf,23);
|
uint32 servertype = IVAL(buf,23);
|
||||||
fstring comment;
|
fstring comment;
|
||||||
unstring work_name;
|
unstring work_name;
|
||||||
struct work_record *work;
|
struct work_record *work = NULL;
|
||||||
struct server_record *servrec;
|
struct server_record *servrec;
|
||||||
unstring source_name;
|
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
|
* This server is announcing it is going down. Remove it from the
|
||||||
* workgroup.
|
* workgroup.
|
||||||
*/
|
*/
|
||||||
if(!is_myname(server_name) && (work != NULL) &&
|
if(!is_myname(server_name) &&
|
||||||
((servrec = find_server_in_workgroup( work, server_name))!=NULL)) {
|
((servrec = find_server_in_workgroup( work, server_name))!=NULL)) {
|
||||||
remove_server_from_workgroup( work, servrec);
|
remove_server_from_workgroup( work, servrec);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user