1
0
mirror of https://github.com/irssi/irssi.git synced 2024-12-04 14:46:39 -05:00

Merge pull request #1130 from ailin-nemui/string-free

Only call g_string_free if there is a string
This commit is contained in:
ailin-nemui 2019-10-01 13:55:46 +02:00 committed by GitHub
commit 49c6c2b69f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -457,8 +457,10 @@ static void sig_destroyed(IRC_SERVER_REC *server)
server->cap_queue = NULL;
/* was g_free_and_null, but can't use on a GString */
g_string_free(server->sasl_buffer, TRUE);
server->sasl_buffer = NULL;
if (server->sasl_buffer != NULL) {
g_string_free(server->sasl_buffer, TRUE);
server->sasl_buffer = NULL;
}
/* these are dynamically allocated only if isupport was sent */
g_hash_table_foreach(server->isupport,