diff options
author | Paul Wise <pabs3@bonedaddy.net> | 2012-09-05 11:44:52 +0200 |
---|---|---|
committer | Berke Viktor <bviktor@hexchat.org> | 2012-09-05 11:44:52 +0200 |
commit | 8cf6d493c61d5838ada916c7df1f729aa4631487 (patch) | |
tree | 3586ff6ac68a12f5f201dcc89b6769d66a4ebd07 /src | |
parent | 6e5c314e6118796ebec83bac251d7c114f3015b2 (diff) |
Fix unchecked malloc
Diffstat (limited to 'src')
-rw-r--r-- | src/common/xchat.c | 4 |
1 files changed, 4 insertions, 0 deletions
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; |