aboutsummaryrefslogtreecommitdiff
path: root/elf
diff options
context:
space:
mode:
Diffstat (limited to 'elf')
-rw-r--r--elf/dl-deps.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/elf/dl-deps.c b/elf/dl-deps.c
index dc372e6..899692e 100644
--- a/elf/dl-deps.c
+++ b/elf/dl-deps.c
@@ -449,12 +449,11 @@ _dl_map_object_deps (struct link_map *map,
{
needed[nneeded++] = NULL;
- l->l_initfini =
- (struct link_map **) malloc (nneeded * sizeof (struct link_map));
+ l->l_initfini = malloc (nneeded * sizeof needed[0]);
if (l->l_initfini == NULL)
_dl_signal_error (ENOMEM, map->l_name,
"cannot allocate dependency list");
- memcpy (l->l_initfini, needed, nneeded * sizeof (struct link_map));
+ memcpy (l->l_initfini, needed, nneeded * sizeof needed[0]);
}
/* If we have no auxiliary objects just go on to the next map. */