mirror of
https://github.com/hexchat/hexchat.git
synced 2024-11-06 11:12:34 +01:00
Fix unchecked malloc
This commit is contained in:
parent
6e5c314e61
commit
8cf6d493c6
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user