mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-23 01:06:22 +00:00
Some minor improvements
* destroy/free/shutdown/close in reverse order of allocation * more static/auto_Xfree * less variables/strlen/GString * properly `\0`-terminate string of testcase Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
This commit is contained in:
@@ -69,8 +69,8 @@ static void
|
||||
_chat_session_free(ChatSession* session)
|
||||
{
|
||||
if (session) {
|
||||
free(session->barejid);
|
||||
free(session->resource);
|
||||
free(session->barejid);
|
||||
free(session);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2571,7 +2571,8 @@ iq_send_stanza(xmpp_stanza_t* const stanza)
|
||||
if (plugin_text) {
|
||||
xmpp_send_raw_string(conn, "%s", plugin_text);
|
||||
} else {
|
||||
xmpp_send_raw_string(conn, "%s", text);
|
||||
/* libstrophe does the strlen for us, so simply always pass SIZE_MAX */
|
||||
xmpp_send_raw(conn, text, SIZE_MAX);
|
||||
}
|
||||
xmpp_free(connection_get_ctx(), text);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user