about summary refs log tree commit diff
path: root/elf
diff options
context:
space:
mode:
Diffstat (limited to 'elf')
-rw-r--r--elf/dl-load.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/elf/dl-load.c b/elf/dl-load.c
index 3e5e291018..cc3ac6e15e 100644
--- a/elf/dl-load.c
+++ b/elf/dl-load.c
@@ -1,5 +1,5 @@
 /* Map in a shared object's segments from the file.
-   Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+   Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -470,6 +470,8 @@ _dl_init_paths (const char *llp)
   /* First set up the rest of the default search directory entries.  */
   aelem = rtld_search_dirs = (struct r_search_path_elem **)
     malloc ((ncapstr + 1) * sizeof (struct r_search_path_elem *));
+  if (rtld_search_dirs == NULL)
+    _dl_signal_error (ENOMEM, NULL, "cannot create search path array");
 
   round_size = ((2 * sizeof (struct r_search_path_elem) - 1
 		 + ncapstr * sizeof (enum r_dir_status))