Commit 3bbf2f1e authored by Gerald Carter's avatar Gerald Carter Committed by Gerald (Jerry) Carter
Browse files

r557: another patch from Stephan Kulow <coolo@suse.de> -- check cli * before dereferencing it

(This used to be commit c385fb467fc2a669d54b9a2faddbf66f9e4699c6)
parent ba8a59db
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -1991,6 +1991,12 @@ static SMBCFILE *smbc_opendir_ctx(SMBCCTX *context, const char *fname)
                        DEBUG(99, ("Found master browser %s\n", inet_ntoa(ip_list[i].ip)));
                        
                        cli = get_ipc_connect_master_ip(&ip_list[i], workgroup, &u_info);

			/* cli == NULL is the master browser refused to talk or 
			   could not be found */
			if ( !cli )
				continue;

                        fstrcpy(server, cli->desthost);
                        cli_shutdown(cli);