PERFORCE change 104170 for review

John Birrell jb at FreeBSD.org
Wed Aug 16 01:54:50 UTC 2006


http://perforce.freebsd.org/chv.cgi?CH=104170

Change 104170 by jb at jb_freebsd2 on 2006/08/16 01:54:35

	Zero the allocated memory to reset everything to a known default.
	
	Then it is only necessary to set the variables that aren't zero
	by default.

Affected files ...

.. //depot/projects/dtrace/src/lib/libelf/elf_allocate.c#3 edit

Differences ...

==== //depot/projects/dtrace/src/lib/libelf/elf_allocate.c#3 (text+ko) ====

@@ -49,6 +49,8 @@
 		return NULL;
 	}
 
+	memset(e, 0, sizeof(*e));
+
 	e->e_kind = ELF_K_NONE;
 	e->e_class = ELFCLASSNONE;
 	e->e_cmd = ELF_C_NULL;


More information about the p4-projects mailing list