mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-15 18:20:20 +00:00
Use glib for all allocations
- Removes need to check for malloc failure - Removes need for NULL checks on free - Adds checks for integer overflows - Removes some extra memset calls - Removes chance of mixing libc and glib malloc/free
This commit is contained in:
@@ -44,12 +44,12 @@ ctcp_reply (session *sess, char *nick, char *word[], char *word_eol[],
|
||||
{
|
||||
char tbuf[4096]; /* can receive 2048 from IRC, so this is enough */
|
||||
|
||||
conf = strdup (conf);
|
||||
conf = g_strdup (conf);
|
||||
/* process %C %B etc */
|
||||
check_special_chars (conf, TRUE);
|
||||
auto_insert (tbuf, sizeof (tbuf), conf, word, word_eol, "", "", word_eol[5],
|
||||
server_get_network (sess->server, TRUE), "", "", nick, "");
|
||||
free (conf);
|
||||
g_free (conf);
|
||||
handle_command (sess, tbuf, FALSE);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user