Browse files

10_fix_unchecked_mallocs.patch

from debian

Fix unchecked mallocs throughout the source code.
  • Loading branch information...
1 parent d39c607 commit e79504bec4e778de7fb1390335e4f4fa28428219 @pabs3 pabs3 committed with youknowone Jun 13, 2012
Showing with 2 additions and 0 deletions.
  1. +2 −0 src/common/xchat.c
View
2 src/common/xchat.c
@@ -349,6 +349,8 @@ 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;

0 comments on commit e79504b

Please sign in to comment.