summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libelf/elf_newscn.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libelf/elf_newscn.c b/libelf/elf_newscn.c
index d6bdf153..ec731f75 100644
--- a/libelf/elf_newscn.c
+++ b/libelf/elf_newscn.c
@@ -94,9 +94,9 @@ elf_newscn (Elf *elf)
1
#endif
)
- newp = calloc (sizeof (Elf_ScnList)
- + ((elf->state.elf.scnincr *= 2)
- * sizeof (Elf_Scn)), 1);
+ newp = calloc (1, sizeof (Elf_ScnList)
+ + ((elf->state.elf.scnincr *= 2)
+ * sizeof (Elf_Scn)));
if (newp == NULL)
{
__libelf_seterrno (ELF_E_NOMEM);