summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/plugins/relay/irc/relay-irc.c3
-rw-r--r--src/plugins/relay/relay-client.c3
-rw-r--r--src/plugins/relay/relay-raw.c3
-rw-r--r--src/plugins/relay/weechat/relay-weechat-msg.c3
-rw-r--r--src/plugins/relay/weechat/relay-weechat-nicklist.c6
-rw-r--r--src/plugins/relay/weechat/relay-weechat.c3
6 files changed, 21 insertions, 0 deletions
diff --git a/src/plugins/relay/irc/relay-irc.c b/src/plugins/relay/irc/relay-irc.c
index 3292002ea..3085b1acc 100644
--- a/src/plugins/relay/irc/relay-irc.c
+++ b/src/plugins/relay/irc/relay-irc.c
@@ -1859,6 +1859,9 @@ relay_irc_alloc_with_infolist (struct t_relay_client *client,
void
relay_irc_free (struct t_relay_client *client)
{
+ if (!client)
+ return;
+
if (client->protocol_data)
{
if (RELAY_IRC_DATA(client, address))
diff --git a/src/plugins/relay/relay-client.c b/src/plugins/relay/relay-client.c
index be4b40786..e7bf52a88 100644
--- a/src/plugins/relay/relay-client.c
+++ b/src/plugins/relay/relay-client.c
@@ -757,6 +757,9 @@ relay_client_outqueue_free (struct t_relay_client *client,
{
struct t_relay_client_outqueue *new_outqueue;
+ if (!client || !outqueue)
+ return;
+
/* remove outqueue message */
if (client->last_outqueue == outqueue)
client->last_outqueue = outqueue->prev_outqueue;
diff --git a/src/plugins/relay/relay-raw.c b/src/plugins/relay/relay-raw.c
index c60c46e57..eda322ffa 100644
--- a/src/plugins/relay/relay-raw.c
+++ b/src/plugins/relay/relay-raw.c
@@ -119,6 +119,9 @@ relay_raw_message_free (struct t_relay_raw_message *raw_message)
{
struct t_relay_raw_message *new_raw_messages;
+ if (!raw_message)
+ return;
+
/* remove message from raw messages list */
if (last_relay_raw_message == raw_message)
last_relay_raw_message = raw_message->prev_message;
diff --git a/src/plugins/relay/weechat/relay-weechat-msg.c b/src/plugins/relay/weechat/relay-weechat-msg.c
index a7a1eb002..305823528 100644
--- a/src/plugins/relay/weechat/relay-weechat-msg.c
+++ b/src/plugins/relay/weechat/relay-weechat-msg.c
@@ -1095,6 +1095,9 @@ relay_weechat_msg_send (struct t_relay_client *client,
void
relay_weechat_msg_free (struct t_relay_weechat_msg *msg)
{
+ if (!msg)
+ return;
+
if (msg->id)
free (msg->id);
if (msg->data)
diff --git a/src/plugins/relay/weechat/relay-weechat-nicklist.c b/src/plugins/relay/weechat/relay-weechat-nicklist.c
index b8bb10638..06d8f6a67 100644
--- a/src/plugins/relay/weechat/relay-weechat-nicklist.c
+++ b/src/plugins/relay/weechat/relay-weechat-nicklist.c
@@ -122,6 +122,9 @@ relay_weechat_nicklist_add_item (struct t_relay_weechat_nicklist *nicklist,
void
relay_weechat_nicklist_item_free (struct t_relay_weechat_nicklist_item *item)
{
+ if (!item)
+ return;
+
if (item->name)
free (item->name);
if (item->color)
@@ -141,6 +144,9 @@ relay_weechat_nicklist_free (struct t_relay_weechat_nicklist *nicklist)
{
int i;
+ if (!nicklist)
+ return;
+
/* free items */
if (nicklist->items_count > 0)
{
diff --git a/src/plugins/relay/weechat/relay-weechat.c b/src/plugins/relay/weechat/relay-weechat.c
index c6a0ad39e..2b3ccab7c 100644
--- a/src/plugins/relay/weechat/relay-weechat.c
+++ b/src/plugins/relay/weechat/relay-weechat.c
@@ -277,6 +277,9 @@ relay_weechat_alloc_with_infolist (struct t_relay_client *client,
void
relay_weechat_free (struct t_relay_client *client)
{
+ if (!client)
+ return;
+
if (client->protocol_data)
{
if (RELAY_WEECHAT_DATA(client, buffers_sync))