mirror of
https://github.com/fail0verflow/switch-coreboot.git
synced 2025-05-04 01:39:18 -04:00
UPSTREAM: flashmap: Allocate at least one entry in kv_pair_new()
BUG=None BRANCH=None TEST=None Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-on: https://review.coreboot.org/14444 Reviewed-by: Patrick Georgi <pgeorgi@google.com> Change-Id: I971fa85ed977884d050790560a5a8f2ce955eb7c Reviewed-on: https://chromium-review.googlesource.com/369082 Commit-Ready: Furquan Shaikh <furquan@chromium.org> Tested-by: Furquan Shaikh <furquan@chromium.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
parent
f5219cf74b
commit
ce594e4d22
1 changed files with 1 additions and 1 deletions
|
@ -56,7 +56,7 @@ struct kv_pair *kv_pair_new(void)
|
|||
{
|
||||
struct kv_pair *kv;
|
||||
|
||||
kv = calloc(0, sizeof(*kv));
|
||||
kv = calloc(1, sizeof(*kv));
|
||||
if (!kv)
|
||||
return NULL;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue