From 8cf6d493c61d5838ada916c7df1f729aa4631487 Mon Sep 17 00:00:00 2001 From: Paul Wise Date: Wed, 5 Sep 2012 11:44:52 +0200 Subject: Fix unchecked malloc --- src/common/xchat.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/common/xchat.c b/src/common/xchat.c index 21e2bd9e..12c31379 100644 --- a/src/common/xchat.c +++ b/src/common/xchat.c @@ -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; -- cgit 1.4.1