check return value of alloc functions, from Charles Longeau
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@21745 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -138,6 +138,8 @@ struct string_list*
|
||||
append_string(struct string_list *list, char *str)
|
||||
{
|
||||
struct string_list *sl = malloc(sizeof(*sl));
|
||||
if (sl == NULL)
|
||||
return sl;
|
||||
sl->string = str;
|
||||
sl->next = NULL;
|
||||
if(list) {
|
||||
|
Reference in New Issue
Block a user