mirror of
https://github.com/moparisthebest/hexchat
synced 2024-11-22 17:22:18 -05: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;
|
||||
|
||||
sess = malloc (sizeof (struct session));
|
||||
if (sess == NULL)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
memset (sess, 0, sizeof (struct session));
|
||||
|
||||
sess->server = serv;
|
||||
|
Loading…
Reference in New Issue
Block a user