1
0
mirror of https://github.com/moparisthebest/hexchat synced 2024-11-23 01:32:22 -05:00

Fix unchecked malloc

This commit is contained in:
Paul Wise 2012-09-05 11:44:52 +02:00 committed by Berke Viktor
parent 6e5c314e61
commit 8cf6d493c6

View File

@ -351,6 +351,10 @@ session_new (server *serv, char *from, int type, int focus)
session *sess; session *sess;
sess = malloc (sizeof (struct session)); sess = malloc (sizeof (struct session));
if (sess == NULL)
{
return NULL;
}
memset (sess, 0, sizeof (struct session)); memset (sess, 0, sizeof (struct session));
sess->server = serv; sess->server = serv;