summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2024-04-25 19:28:11 +0200
committerSébastien Helleu <flashcode@flashtux.org>2024-04-26 21:06:06 +0200
commitee51e6c05f4895c6fb73e1555708d47f1af8c922 (patch)
treef1f18834175579b00543ef839d28eb4bdb65cdcd /src
parent61ff0b858722f30b1da9107b205642cf193a2dd3 (diff)
downloadweechat-ee51e6c05f4895c6fb73e1555708d47f1af8c922.zip
plugins: remove check of NULL pointers before calling weechat_infolist_free() (issue #865)
Diffstat (limited to 'src')
-rw-r--r--src/plugins/python/weechat-python.c3
-rw-r--r--src/plugins/relay/irc/relay-irc.c3
2 files changed, 2 insertions, 4 deletions
diff --git a/src/plugins/python/weechat-python.c b/src/plugins/python/weechat-python.c
index 7bc3e9247..21fc0059d 100644
--- a/src/plugins/python/weechat-python.c
+++ b/src/plugins/python/weechat-python.c
@@ -1358,8 +1358,7 @@ weechat_python_infolist_constants ()
return infolist;
error:
- if (infolist)
- weechat_infolist_free (infolist);
+ weechat_infolist_free (infolist);
return NULL;
}
diff --git a/src/plugins/relay/irc/relay-irc.c b/src/plugins/relay/irc/relay-irc.c
index ddb8516a4..79847cd5a 100644
--- a/src/plugins/relay/irc/relay-irc.c
+++ b/src/plugins/relay/irc/relay-irc.c
@@ -561,8 +561,7 @@ relay_irc_signal_irc_outtags_cb (const void *pointer, void *data,
(host && host[0]) ? host : "",
ptr_message);
- if (infolist_nick)
- weechat_infolist_free (infolist_nick);
+ weechat_infolist_free (infolist_nick);
}
}
free (irc_channel);