coreboot-kgpe-d16/payloads
Jonathan Neuschäfer a4fbc385e0 libpayload/libc: Fix memset/sizeof usage
Since r is a pointer, memset(r, 0, sizeof(r)) would only zero the first
4 (or 8) bytes of the newly allocated struct align_region_t.

An alternative to this patch would be to use calloc, or introduce a new
zalloc (zeroed allocation; a single-element calloc) and use that.

Change-Id: Ic3e3487ce749eeebf6c4836e62b8a305ad766e7e
Found-by: Coverity (ID 1291160)
Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Reviewed-on: https://review.coreboot.org/14244
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2016-04-06 13:33:07 +02:00
..
bayou codebase: Change makefile $(shell pwd) commands to $(CURDIR) 2016-03-11 18:48:06 +01:00
coreinfo coreinfo: Allow numbers in addition to F keys 2016-03-18 21:47:46 +01:00
external payloads: Add a target to print payload git urls and directories 2016-03-21 14:32:02 +01:00
libpayload libpayload/libc: Fix memset/sizeof usage 2016-04-06 13:33:07 +02:00
nvramcui nvramcui: Add distclean target 2016-03-11 17:56:47 +01:00
Kconfig payloads: Move secondary payloads inside of a submenu 2016-03-09 17:03:21 +01:00
Makefile.inc payloads: Add a target to print payload git urls and directories 2016-03-21 14:32:02 +01:00