summaryrefslogtreecommitdiff
path: root/util/cbfstool/flashmap
diff options
context:
space:
mode:
authorStefan Reinauer <stefan.reinauer@coreboot.org>2016-04-20 22:13:37 -0700
committerPatrick Georgi <pgeorgi@google.com>2016-08-09 15:00:50 +0200
commit1bf00079c15c7afff5f82dd0f84e4372ef3c77b2 (patch)
tree6672c8cba8d758f2ede5738c08c3481b9f22ce20 /util/cbfstool/flashmap
parent3d609325b9e793c2d817715ff8a4ce3cbeb92cec (diff)
downloadcoreboot-1bf00079c15c7afff5f82dd0f84e4372ef3c77b2.tar.xz
flashmap: Allocate at least one entry in kv_pair_new()
Change-Id: I971fa85ed977884d050790560a5a8f2ce955eb7c Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-on: https://review.coreboot.org/14444 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'util/cbfstool/flashmap')
-rw-r--r--util/cbfstool/flashmap/kv_pair.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/cbfstool/flashmap/kv_pair.c b/util/cbfstool/flashmap/kv_pair.c
index 95e5034e95..c02068c1c2 100644
--- a/util/cbfstool/flashmap/kv_pair.c
+++ b/util/cbfstool/flashmap/kv_pair.c
@@ -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;