Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix SOCKS5 username\password set. fix SOCKS5 request #927

Closed
wants to merge 5 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix SOCKS5 username and password set
Signed-off-by: yzhivik <[email protected]>
  • Loading branch information
yzhivik committed Aug 31, 2018
commit 15e84c34cd035177306bd1467da126602c8f383e
6 changes: 4 additions & 2 deletions lib/socks_mosq.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,10 @@ int mosquitto_socks5_set(struct mosquitto *mosq, const char *host, int port, con

if(password){
mosq->socks5_password = mosquitto__strdup(password);
mosquitto__free(mosq->socks5_username);
return MOSQ_ERR_NOMEM;
if(!mosq->socks5_password){
mosquitto__free(mosq->socks5_username);
return MOSQ_ERR_NOMEM;
}
}
}

Expand Down