mirror of
https://github.com/weechat/weechat.git
synced 2026-06-26 04:46:37 +02:00
irc: fix crash when setting a wrong value in server option "ssl_priorities"
The bug was introduced by commit 2305c95db0
This commit is contained in:
@@ -978,9 +978,11 @@ irc_config_check_gnutls_priorities (const char *priorities)
|
||||
return NULL;
|
||||
|
||||
rc = gnutls_priority_init (&priority_cache, priorities, &pos_error);
|
||||
gnutls_priority_deinit (priority_cache);
|
||||
if (rc == GNUTLS_E_SUCCESS)
|
||||
{
|
||||
gnutls_priority_deinit (priority_cache);
|
||||
return NULL;
|
||||
}
|
||||
if (pos_error)
|
||||
return pos_error;
|
||||
return priorities;
|
||||
|
||||
Reference in New Issue
Block a user