diff --git a/modutils/insmod.c b/modutils/insmod.c
index 9dcc5b0..120feab 100644
--- a/modutils/insmod.c
+++ b/modutils/insmod.c
@@ -2212,7 +2212,7 @@
 	sec->name = name;
 	sec->idx = newidx;
 	if (size)
-		sec->contents = xmalloc(size);
+		sec->contents = xzalloc(size);
 
 	obj_insert_section_load_order(f, sec);
 
@@ -2227,7 +2227,7 @@
 	int newidx = f->header.e_shnum++;
 	struct obj_section *sec;
 
-	f->sections = xrealloc(f->sections, (newidx + 1) * sizeof(sec));
+	f->sections = xrealloc_vector(f->sections, 2, newidx);
 	f->sections[newidx] = sec = arch_new_section();
 
 	sec->header.sh_type = SHT_PROGBITS;
@@ -2237,7 +2237,7 @@
 	sec->name = name;
 	sec->idx = newidx;
 	if (size)
-		sec->contents = xmalloc(size);
+		sec->contents = xzalloc(size);
 
 	sec->load_next = f->load_order;
 	f->load_order = sec;
@@ -2689,8 +2689,7 @@
 	/* Collect the modules' symbols.  */
 
 	if (nmod) {
-		ext_modules = modules = xmalloc(nmod * sizeof(*modules));
-		memset(modules, 0, nmod * sizeof(*modules));
+		ext_modules = modules = xzalloc(nmod * sizeof(*modules));
 		for (i = 0, mn = module_names, m = modules;
 				i < nmod; ++i, ++m, mn += strlen(mn) + 1) {
 			struct new_module_info info;
@@ -2770,13 +2769,14 @@
 }
 
 
-static void  new_create_this_module(struct obj_file *f, const char *m_name)
+static void new_create_this_module(struct obj_file *f, const char *m_name)
 {
 	struct obj_section *sec;
 
 	sec = obj_create_alloced_section_first(f, ".this", tgt_sizeof_long,
 			sizeof(struct new_module));
-	memset(sec->contents, 0, sizeof(struct new_module));
+	/* done by obj_create_alloced_section_first: */
+	/*memset(sec->contents, 0, sizeof(struct new_module));*/
 
 	obj_add_symbol(f, SPFX "__this_module", -1,
 			ELF_ST_INFO(STB_LOCAL, STT_OBJECT), sec->idx, 0,
@@ -3083,9 +3083,9 @@
 		if (i == f->header.e_shnum) {
 			struct obj_section *sec;
 
+			f->header.e_shnum++;
 			f->sections = xrealloc_vector(f->sections, 2, i);
 			f->sections[i] = sec = arch_new_section();
-			f->header.e_shnum = i + 1;
 
 			sec->header.sh_type = SHT_PROGBITS;
 			sec->header.sh_flags = SHF_WRITE | SHF_ALLOC;
@@ -3124,12 +3124,9 @@
 	for (i = 0; i < f->header.e_shnum; ++i) {
 		struct obj_section *s = f->sections[i];
 		if (s->header.sh_type == SHT_NOBITS) {
+			s->contents = NULL;
 			if (s->header.sh_size != 0)
-				s->contents = memset(xmalloc(s->header.sh_size),
-						0, s->header.sh_size);
-			else
-				s->contents = NULL;
-
+				s->contents = xzalloc(s->header.sh_size),
 			s->header.sh_type = SHT_PROGBITS;
 		}
 	}
@@ -3354,8 +3351,7 @@
 	}
 
 	shnum = f->header.e_shnum;
-	f->sections = xmalloc(sizeof(struct obj_section *) * shnum);
-	memset(f->sections, 0, sizeof(struct obj_section *) * shnum);
+	f->sections = xzalloc(sizeof(struct obj_section *) * shnum);
 
 	section_headers = alloca(sizeof(ElfW(Shdr)) * shnum);
 	fseek(fp, f->header.e_shoff, SEEK_SET);
@@ -3391,14 +3387,13 @@
 			case SHT_SYMTAB:
 			case SHT_STRTAB:
 			case SHT_RELM:
+				sec->contents = NULL;
 				if (sec->header.sh_size > 0) {
-					sec->contents = xmalloc(sec->header.sh_size);
+					sec->contents = xzalloc(sec->header.sh_size);
 					fseek(fp, sec->header.sh_offset, SEEK_SET);
 					if (fread(sec->contents, sec->header.sh_size, 1, fp) != 1) {
 						bb_perror_msg_and_die("error reading ELF section data");
 					}
-				} else {
-					sec->contents = NULL;
 				}
 				break;
 
