relay: fix crash on /upgrade when the real IP is not set (closes #1294)
parent
50415dfbb7
commit
c869aa3809
|
@ -41,6 +41,7 @@ Bug fixes::
|
|||
* irc: return IRC color code instead of WeeChat color code when decoding a too short ANSI color sequence
|
||||
* irc: fix encoding of italic attribute when colors are removed
|
||||
* irc: fix parsing of "time" message tag on FreeBSD (issue #1289)
|
||||
* relay: fix crash on /upgrade when the real IP is not set (issue #1294)
|
||||
* relay: fix memory leak in connection of client
|
||||
|
||||
Tests::
|
||||
|
|
|
@ -1414,7 +1414,8 @@ relay_client_new_with_infolist (struct t_infolist *infolist)
|
|||
new_client->websocket = weechat_infolist_integer (infolist, "websocket");
|
||||
new_client->http_headers = NULL;
|
||||
new_client->address = strdup (weechat_infolist_string (infolist, "address"));
|
||||
new_client->real_ip = strdup (weechat_infolist_string (infolist, "real_ip"));
|
||||
str = weechat_infolist_string (infolist, "real_ip");
|
||||
new_client->real_ip = (str) ? strdup (str) : NULL;
|
||||
new_client->status = weechat_infolist_integer (infolist, "status");
|
||||
new_client->protocol = weechat_infolist_integer (infolist, "protocol");
|
||||
str = weechat_infolist_string (infolist, "protocol_string");
|
||||
|
|
Loading…
Reference in New Issue