summaryrefslogtreecommitdiff
path: root/lib/trusty/ql-tipc/keymaster.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/trusty/ql-tipc/keymaster.c')
-rw-r--r--lib/trusty/ql-tipc/keymaster.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/trusty/ql-tipc/keymaster.c b/lib/trusty/ql-tipc/keymaster.c
index 3d026b0a23..282cb53cdb 100644
--- a/lib/trusty/ql-tipc/keymaster.c
+++ b/lib/trusty/ql-tipc/keymaster.c
@@ -690,6 +690,11 @@ int trusty_set_boot_patch_level(uint32_t boot_patch_level)
int rc;
req = trusty_calloc(4, 1); // 4 bytes should be enough.
+ if (!req) {
+ trusty_error("trusty_calloc memory failed!\n");
+ return -1;
+ }
+
memcpy(req, &boot_patch_level, sizeof(uint32_t));
req_size = sizeof(uint32_t);