mirror of
https://github.com/profanity-im/profanity.git
synced 2024-11-03 19:37:16 -05:00
Free stanza text on plugin send hooks
This commit is contained in:
parent
6df6fed305
commit
2bacd43a16
@ -2071,6 +2071,7 @@ send_iq_stanza(xmpp_stanza_t *const stanza)
|
||||
char *plugin_text = plugins_on_iq_stanza_send(text);
|
||||
if (plugin_text) {
|
||||
xmpp_send_raw_string(conn, "%s", plugin_text);
|
||||
free(plugin_text);
|
||||
} else {
|
||||
xmpp_send_raw_string(conn, "%s", text);
|
||||
}
|
||||
|
@ -872,6 +872,7 @@ _send_message_stanza(xmpp_stanza_t *const stanza)
|
||||
char *plugin_text = plugins_on_message_stanza_send(text);
|
||||
if (plugin_text) {
|
||||
xmpp_send_raw_string(conn, "%s", plugin_text);
|
||||
free(plugin_text);
|
||||
} else {
|
||||
xmpp_send_raw_string(conn, "%s", text);
|
||||
}
|
||||
|
@ -841,6 +841,7 @@ _send_presence_stanza(xmpp_stanza_t *const stanza)
|
||||
char *plugin_text = plugins_on_presence_stanza_send(text);
|
||||
if (plugin_text) {
|
||||
xmpp_send_raw_string(conn, "%s", plugin_text);
|
||||
free(plugin_text);
|
||||
} else {
|
||||
xmpp_send_raw_string(conn, "%s", text);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user