* libltdl/slist.c (slist_new): Handle malloc failure gracefully.

This commit is contained in:
Ralf Wildenhues 2004-09-01 15:31:34 +00:00 committed by Gary V. Vaughan
parent 2d9235e58c
commit d1f90d0769
2 changed files with 9 additions and 2 deletions

View File

@ -1,3 +1,7 @@
2004-09-01 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* libltdl/slist.c (slist_new): Handle malloc failure gracefully.
2004-09-01 Gary V. Vaughan <gary@gnu.org>
* libtoolize.in, config/ltmain.in: Add CDPATH protection to

View File

@ -37,8 +37,11 @@ slist_new (const void *userdata)
{
SList *node = malloc (sizeof *node);
node->next = 0;
node->userdata = userdata;
if (node)
{
node->next = 0;
node->userdata = userdata;
}
return node;
}